Specifications
131ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
To use the compc compiler, you should understand how to pass options and use configuration files. For more
information, see “About the command-line compilers” on page 131.
The syntax of the compc compiler is as follows:
compc [options] -include-classes class [...]
The default option for compc is include-classes. At least one of the “include-” options is required.
To see a list of supported options for compc, you can use the
help list option, as the following example shows:
compc -help list
The compc compiler uses the default compiler settings in the flex-config.xml file. Like the application compiler,
you can change these settings or use another custom configuration file. Unlike the application compiler, however,
the component compiler does not support the use of default configuration files.
You cannot use the compc compiler to create a SWC file from a FLA file or other file created in the Adobe® Flash®
authoring environment.
You can also open the compc compiler with the
java command on the command line. For more information, see
“Invoking the command-line compilers with Java” on page 133.
About the command-line compilers
You use the mxmlc and compc command-line compilers to compile your MXML and AS files into SWF and SWC
files. You can use the utilities to precompile Flex applications that you want to deploy on another server or to
automate compilation in a testing environment.
To use the command-line compilers, you must have a Java run-time environment in your system path.
For Flex SDK, the command-line compilers are located in the flex_install_dir/bin directory. For Flex Builder, the
compilers are located in the flex_builder_install_dir/sdks/sdk_version/bin directory.
When using mxmlc and compc on the command line, you can also use a configuration file to store your options
rather than list them on the command line. You can store command-line options as XML blocks in a configuration
file. For more information, see “About configuration files” on page 134.
Command-line syntax
The mxmlc and compc compilers take many options. The options are listed in the help which you can view with
the
help option, as the following example shows:
mxmlc -help










