Specifications

CHAPTER 7
122
You can also use a local configuration file that overrides the compiler options of the flex-config.xml file. You give
this local configuration file the same name as the MXML file, plus -config.xml” and store it in the same directory.
When you compile your MXML file, the compiler looks for a local configuration file first, then the flex-config.xml
file.
For more information on compiler configuration files, see About configuration files” on page 134.
JVM configuration
The Flex compilers use the Java JRE. Configuring the JVM can result in faster and more efficient compilations.
Without a JVM, you cannot use the mxmlc and compc command-line compilers. You can configure JVM settings
such as the Java source path, Java library path, and memory settings.
On Windows, you use the compc.exe and mxmlc.exe executable files in the bin directory to compile Flex applica-
tions and component libraries. You use the fdb.exe executable file in the bin directory to debug applications. The
executable files use the jvm.config file to set JVM arguments. The jvm.config file is in the same directory as the
executable files. If you move it or the executable files to another directory, they use their default settings and not
the settings defined in the jvm.config file.
The fdb, compc, and mxmlc shell scripts (for UNIX, Linux, or Windows systems running a UNIX-shell emulator
such as Cygwin) do not take a configuration file. You set the JVM arguments inside the shell script file.
Locating the jvm.config file
The location of the jvm.config file depends on which Flex product you use. The following table shows the location
and use of the product-specific jvm.config files:
Changing the JVM heap size
The most common JVM configuration is to set the size of the Java heap. The Java heap is the amount of memory
reserved for the JVM. The actual size of the heap during run time varies as classes are loaded and unloaded. If the
heap requires more memory than the maximum amount allocated, performance will suffer as the JVM performs
garbage collection to maintain enough free memory for the applications to run.
You can set the initial heap size (or minimum) and the maximum heap size on most JVMs. By providing a larger
heap size, you give the JVM more memory with which to defer garbage collection. However, you must not assign
all of the systems memory to the Java heap so that other processes can run optimally.
Product Location of jvm.config Description
Flex SDK sdk_install_dir/bin Used by the Java process opened by the mxmlc and compc command-line
executable files.