Adobe Flex 3 Help

About configuration files

The various compilers and servers use the configuration files differently.

Applying license keys

You typically add a license key if you want to unlock the source code for the data visualization packages, or if you want to remove the watermark from your applications that use the charting and AdvancedDataGrid components.

There are several methods to set the license key for your Flex compiler. You can set your license key in the following ways:

  • Use the license manager in Flex Builder
  • Edit the license.properties file
  • Edit the flex-config.xml file
  • Use the license command line compiler option
  • Use the Configuration.setLicense() method (compiler API only)

Use the license manager in Flex Builder

To enter your license key in Flex Builder, select Help > Manage Flex Licenses.

Edit the license.properties file

You can manually add your license key to the license.properties file. You add the license key to the value of the flexbuilder3 key, as the following example shows:

flexbuilder3=00000000000000000000

The location of the license.properties file is operating system-dependent. It is located in the following directories:

Operating System

Location

Windows XP

C:\Documents and Settings\All Users\Application Data\Adobe\Flex\license.properties

Windows Vista

C:\ProgramData\Adobe\Flex\license.properties

Mac OSX

/Library/Application Support/Adobe/Flex/license.properties

Linux

~/.adobe/Flex/license.properties

Edit the flex-config.xml file

You can edit your config.xml file to add a license key. You add it to the <licenses> child tag of the <flex-config> tag, as the following example shows:

<flex-config>
    <licenses>
        <license>
            <product>flexbuilder3</product>
            <serial-number>0000-0000-0000-0000-0000-0000</serial-number>
        </license>
    </licenses>
    ...
</flex-config>

Use the license command-line compiler option

You can pass your license key as an option to the mxmlc and compc command-line compilers. To do this, you use the license option, and pass it a product name and the key. The product name must be "flexbuilder3". The following example shows how to do this:

mxmlc -license=flexbuilder3,00000000000000000000 MyApp.mxml

In Flex Builder, you can pass the license key with the license compiler option by adding it to the Additional Compiler Arguments field in the Flex Compiler properties panel.

Use the Configuration.setLicense() method

If you are using the Flex compiler API to build your Flex applications, you can call the Configuration class's setLicense() method. For more information, see the documentation included with the compiler API.

Root variables

For Flex SDK, the flex_install_dir variable is the top-level directory where you installed the SDK. Under this directory are the bin, frameworks, lib, and samples directories. The flex_app_root directory is the top level location for many files.

Configuration files layout

The layout of the configuration files for Flex SDK is simple. It includes a jvm.config file, fdb command-line debugger shell script, and the mxmlc and compc command-line compiler shell scripts for configuring the JVM that the compiler uses. It also includes the flex-config.xml file that sets the compiler options, as well as executable files for fdb, mxmlc, and compc.

The layout of the configuration files for Flex SDK is as follows:

sdk_install_dir/ 
        bin/jvm.config
        bin/mxmlc
        bin/mxmlc.exe
        bin/compc
        bin/compc.exe
        bin/fdb
        bin/fdb.exe
        frameworks/flex-config.xml