URL : http://www.adobe.com/support/documentation/en/fl ex/2/install.

html#at

Adobe® Flex™ 2 Installation (2.0.1 Update)
This page describes the installation procedure for the Adobe® Flex™ 2 product family. It is divided into the following sections:
• • • • • • •

Installing Flex Builder 2 (includes Flex 2 SDK and Flash Player 9) Installing Flex Data Services 2 (includes Adobe® Flex™ 2 SDK and Adobe® Flash® Player 9) Installing Flex 2 SDK Installing Flex Charting 2 Installing Flex Automated Testing Installing Flash Player 9 Uninstalling

This page also describes how to install the version 2.0.1 update for existing Flex 2 developers.

Installing Flex Builder 2
You can install Flex Builder 2 in either of the following configurations:

Stand-alone IDE - Install this version of Flex Builder 2 if you are not currently using Eclipse™ 3.1.2. It includes a customized version of Eclipse, and its own Java Runtime Environment (JRE). Plug-in - Install this version of Flex Builder 2 if you are currently using Eclipse 3.1.2 (3.2 on Macintosh OS X).

As of the version 2.0.1 update, each configuration features the following installation options:
• • •

Windows full install Windows upgrade install Macintosh full install

Note: If you plan to use Flex Data Services 2 along with Flex Builder 2, it's best to install Flex Data Services first, so you can specify server options when you create Flex Builder projects.

Flex Builder 2 stand-alone To install Flex Builder 2 stand-alone on Windows: The default location of the installation directory for the stand-alone configuration of Flex Builder 2 is C:\Program Files\Adobe\Flex Builder 2. 1. Ensure that your system environment meets the system requirements. 2. Read the Flex Builder 2 Release Notes for any late-breaking information, updates, and known issues. 3. If you have the Flex Builder 2 DVD, insert it into the drive. Otherwise, download the installer file for your platform from the Adobe website or a designated network. 4. Open or double-click the Flex Builder installer executable file. 5. Specify a location to contain temporary files. 6. Select the Flex Builder and Flex SDK option and click Next. 7. Accept the license agreement and follow the prompts. 8. Select which Flash Player 9 browser plug-in to install: Internet Explorer Netscape or Firefox 9. Start Flex Builder. (Windows Vista only) The first time you run Flex Builder 2, you must "Run as Admin", after which you can run it normally. To run as Admin, right click the Flex Builder 2 launch icon in the Start Menu, and select "Run as Admin". 10. (First time only) Enter the Flex Builder serial number or click Try. 11. Read the Flex Start page and continue in a way that matches your learning style:
o o o o

o o o o

o

How Flex Works - Includes topics useful to new Flex developers. Samples - Select Help > Flex Start Page from the menu bar and look under Flex Samples. Tip: Many developers find the Component Explorer to be particularly helpful. Getting Started with Flex 2 - Select Help > Help Contents from the menu bar, open the Flex 2 Help, and expand Getting Started with Flex 2. Getting Started tutorial lessons - Part Two of the Getting Started with Flex 2 book. Online Help - Use Search from the Help menu or the Help window. Dynamic Help - Select Help > Dynamic Help from the menu bar. Flex Builder displays related Help topics as you scroll through your application in code view. Flex Developer Center - Go to http://www.adobe.com/go/flex2_devcenter for articles, Quick Starts, and sample applications.

12. To upgrade to the purchased version of Flex Charting 2, select Help > Manage Flex Licenses from the menu bar and enter the serial number. You may need to recompile charts to remove the watermark. 13. If you did not install the ColdFusion Extensions for Flex Builder during the initial install, you can install them at any time by opening Window Explorer, navigating to the flex_builder_root\ColdFusion Extensions for Flex Builder directory, and following the instructions in the Installing the ColdFusion Extensions for Flex Builder 2.htm file. To upgrade Flex Builder 2 stand-alone to the 2.0.1 update on Windows: 1. Read the Flex Builder 2 Release Notes for any late-breaking information, updates, and known issues. 2. Download Flex Builder 2.0.1 update Installer for Windows from the Adobe Flex Support Center. 3. Open or double-click the installer executable file. 4. Accept the license agreement and follow the prompts. 5. If the installer detects multiple installations of Flex Builder 2, it prompts you for the location to be updated. 6. Select which Flash Player 9 browser plug-in to install:
o o

Internet Explorer Netscape or Firefox

Note: Flex Builder 2.0.1 and Flex SDK 2.0.1 can run with the base version of Flash Player 9 (Version: 9,0,16,0 dated 6/27/07). However, it's best to install the Flash Player 9 Update. 7. (Optional) When the installation finishes, restart your computer to ensure that the updated Flash Player browser plug-in is enabled. 8. Start Flex Builder.
o

o

Windows Vista users - The first time you run Flex Builder 2, you must "Run as Admin", after which you can run it normally. To run as Admin, right click the Flex Builder 2 launch icon in the Start Menu, and select "Run as Admin". Opening existing projects - The first time you open an existing Flex Builder project, you should refresh the workspace by using the -clean option. To do this, open a command window, navigate to the Flex Builder directory, and type FlexBuilder -clean -vmargs -Xmx512m.

To install Flex Builder 2 stand-alone on Macintosh: 1. Read the Flex Builder 2 Release Notes for any late-breaking information, updates, and known issues.

2. If you have the Flex Builder 2 DVD, insert it into the drive. Otherwise, download the installer file for your platform from the Adobe website or a designated network. 3. Open or double-click the installer DMG image. The installer application displays. 4. Open or double-click the installer application to begin the Flex Builder installation process. 5. Accept the license agreement and follow the prompts. 6. To start Flex Builder, you can launch it from the OS X dock or locate and doubleclick the executable file in the \Applications\Adobe Flex Builder 2 folder. Note: If you installed the preliminary version of Flex Builder for Macintosh from Adobe Labs, the first time you open an existing Flex Builder project, you should refresh the workspace by using the -clean option. To do this, follow the procedure outlined on the java.net site. Flex Builder 2 Plug-in If you are currently using Eclipse 3.1.2 (Eclipse 3.2 on Macintosh), you can install Flex Builder as a plug-in. To install the Flex Builder 2 Eclipse plug-in on Windows: 1. Ensure that your system environment meets the system requirements. 2. Read the Flex Builder 2 Release Notes for any late-breaking information, updates, and known issues. 3. If you have the Flex Builder 2 DVD, insert it into the drive. Otherwise, download the installer file for your platform from the Adobe website or a designated network. 4. Open or double-click the installer executable file. 5. Specify a location to contain temporary files. 6. Select the Flex Builder Plug-in and Flex SDK option and click Next. 7. Accept the license agreement and follow the prompts. 8. Select which Flash Player 9 browser plug-in to install: Internet Explorer Netscape or Firefox 9. To start Flex Builder 2 select Programs > Adobe > Adobe Flex Builder 2 Eclipse Launcher from the Start menu. Note: You must create a workspace before continuing. 10. Open the Flex Development perspective by selecting Window > Open Perspective > Flex Development from the menu bar. 11. (First time only) Enter the Flex Builder serial number or click Try. 12. Read the Flex Start page (Help > Flex Start Page) and continue in a way that matches your learning style:
o o o

How Flex Works - Includes topics useful to new Flex developers.

Samples - Select Help > Flex Start Page from the menu bar and look under Flex Samples. Tip: Many developers find the Component Explorer to be particularly helpful. o Getting Started with Flex 2 - Select Help > Help Contents from the menu bar, open the Flex 2 Help, and expand Getting Started with Flex 2. o Getting Started tutorial lessons - Part Two of the Getting Started with Flex 2 book. o Online Help - Use Search from the Help menu or the Help window. o Dynamic Help - Select Help > Dynamic Help from the menu bar. Flex Builder display related Help topics as you scroll through your application in code view. o Flex Developer Center - Go to http://www.adobe.com/go/flex2_devcenter for articles, Quick Starts, and sample applications. 13. To upgrade to the purchased version of Flex Charting 2, select Help > Manage Flex Licenses from the menu bar and enter the serial number. You may need to recompile charts to remove the watermark. 14. If you did not install the ColdFusion Extensions for Flex Builder during the initial install, you can install them at any time by opening Window Explorer, navigating to the flex_builder_root\ColdFusion Extensions for Flex Builder directory, and following the instructions in the Installing the ColdFusion Extensions for Flex Builder 2.htm file.
o

To update the Flex Builder 2 Eclipse plug-in on Windows: 1. Read the Flex Builder 2 Release Notes for any late-breaking information, updates, and known issues. 2. Download the Flex Builder 2.0.1 Update Installer for Windows from the Adobe Flex Support Center. 3. Open or double-click the installer executable file. 4. Accept the license agreement and follow the prompts. 5. If the installer detects multiple installations of Flex Builder 2, it prompts you for the location to be updated. 6. Select which Flash Player 9 browser plug-in to install:
o o

Internet Explorer Netscape or Firefox

Note: Flex Builder 2.0.1 and Flex SDK 2.0.1 can run with the base version of Flash Player 9 (Version: 9,0,16,0 dated 6/27/07). However, it's best to install the Flash Player 9 Update. 7. (Optional) When the installation finishes, restart your computer to ensure that the updated Flash Player browser plug-in is enabled. 8. Start Flex Builder.

o

Opening existing projects - The first time you open an existing Flex Builder project, you should refresh the workspace by using the -clean option. To do this, open a command window, navigate to the Flex Builder directory, and type eclipse -clean -vmargs -Xmx512m.

To install the Flex Builder 2 Eclipse plug-in on Macintosh: 1. Read the Flex Builder 2 Release Notes for any late-breaking information, updates, and known issues. 2. If you have the Flex Builder 2 DVD, insert it into the drive. Otherwise, download the installer file for your platform from the Adobe website or a designated network. 3. Open or double-click the installer DMG image. The installer application displays. 4. Open or double-click the installer application to begin the Flex Builder installation process. 5. Accept the license agreement and follow the prompts. 6. Start Eclipse 3.2. Note: You must create a new workspace before beginning. Select File > Switch Workspace from the menu bar and enter a new folder name. If the folder doesn't exist, Eclipse creates it. Note: When you install Flex Builder as a plug-in, the installer places the Flex SDK in the /Applications/Adobe Flex Builder 2 Plug-in/ directory.

Installing Flex Data Services 2
Adobe® Flex™ Data Services 2 is a J2EE web application that you can install by using one of the following options:
• •

Flex Data Services with integrated JRun Flex Data Services J2EE web application

Flex Data Services includes installers for the following platforms:
• • • •

Windows Solaris Linux Java (cross-platform installer)

The default installation directory is C:\fds2 on Windows and /opt/fds2 on UNIX and Linux. These installation instructions refer to this location as install_root. Tip: The installer prompts for a serial number. If you omit the serial number, the installer installs Flex Data Services Express.

Flex Data Services 2 includes the following Web Application Archive (WAR) files:
• • •

flex.war — The primary Flex WAR file: use this as a starting point for building your Flex Data Services application. samples.war — Sample Flex applications. flex-admin.war — Simple administration and monitoring application.

Each WAR file is a separate, stand-alone application. If you are using the J2EE web application option, you must have an existing J2EE application server or servlet container available and understand web application deployment. 2.0.1 update: There is no 2.0.1 update installer for Flex Data Services 2. It is a complete install with updated files and you must install it into a new directory. To upgrade to version 2.0.1, perform the following steps: 1. Install Flex Data Services into a new directory. For complete information on Flex Data Services 2 installation and deployment, see the instructions that follow. 2. Copy applications and settings to the new structure. Be sure to include the following:
o o o o o o

MXML and ActionScript files. Application assets, such as images and sound files. Java source code and compiled classes for assemblers, data access objects, and data objects.. Destination definitions and other settings specified in the WEBINF/flex/*.xml configuration files Compiler options specified in the WEB-INF/flex/flex-config.xml file. Custom component libraries (SWC files)

Flex Data Services with integrated JRun The Flex Data Services with integrated JRun option installs the following files and directories under the installation root:

Files - The installation root includes the following files: readme.htm - Contains an overview of important information. flex.war - Flex web application, used as a starting point for new applications. o samples.war - Flex Data Services sample applications. o flex-admin.war - Flex Administrator application. o license.txt - license information. flex_sdk_2 directory - Contains the Flex framework, framework source code, and command-line compilers for Flex 2 SDK.
o o

jrun4 directory - Contains a custom installation of JRun 4 u6, including flex, samples, and flex-admin web applications expanded and deployed in the default server. resources directory - Contains installers for Flash Player 9 (in the resources/player/debug subdirectory). Also contains directories and files used for security, clustering, Hibernate, and manually creating HTML wrappers. UninstallerData directory - Contains the uninstaller.

To install Flex Data Services 2 in the integrated JRun configuration: 1. Ensure that your system environment meets the system requirements. 2. Read the Flex Data Services 2 Release Notes for any late-breaking information or updates. 3. If you have the Flex Data Services 2 DVD, insert it into the drive. Otherwise, download the installer file for your platform from the Adobe website or a designated network. 4. Navigate to the installers directory and start the installation program. Do one of the following, depending on your operating system:
o o

Windows - Double-click the installer file. Solaris or Linux - Set the working directory to the directory that contains the installer file, and then enter the installer file for your operating system; for example:
./fds2-lin.bin -i console

5. Accept the license agreement. 6. (Optional) Enter the serial number and follow the prompts. If you don't enter a serial number, Flex Data Services runs in express mode. Note: You can upgrade from express mode to a fully functioning version by entering a serial number in the fds line of the flex-webapp-root/WEBINF/flex/license.properties file (for each Flex Data Services web application) and restarting the server. 7. Select the Flex Data Services With Integrated JRun option. 8. When the installation finishes, view the Readme file for late-breaking information. 9. Install the debugger version of Flash Player from the flex_root/resources/player/debug directory. For Macintosh clients, copy Install Flash Player 9 UB.dmg to the Macintosh and install it. You can optionally copy SAFlashPlayer.dmg to the Macintosh to use the standalone Flash Player. On UNIX and Linux, use these installers to install the debugger version of Flash Player on your Windows clients. 10. (UNIX and Linux only) On UNIX headless servers, open the flex-webapp/WEBINF/flex/flex-config.xml file in a text editor and set the <headless-server> element to true. 11. To start Flex Data Services 2, select Start > Programs > Adobe > Flex Data Services 2 > Start Integrated Flex Server or open a command window, navigate to

install_root/jrun4/bin, and enter the jrun start default command. On UNIX and Linux, enter ./jrun start default. 12. (Flex Charting 2) You can upgrade from trial mode to a fully functioning version of Flex Charting 2 by entering a serial number in the charting line of the flexwebapp-root/WEB-INF/flex/license.properties file (for each Flex Data Services web application) and restarting the server. Flex Data Services J2EE web application The Flex Data Services J2EE web application option installs the following files and directories under the installation root:

Files - The installation root includes the following files: readme.htm - Contains an overview of important information. flex.war - Flex web application, used as a starting point for new applications. o samples.war - Flex Data Services sample applications. o flex-admin.war - Flex Administrator application. o license.txt - Contains license information. flex_sdk_2 directory - Contains the Flex framework, framework source code, and command-line compilers for Flex 2 SDK. resources directory - Contains installers for Flash Player 9 (in the resources/player/debug subdirectory). Also contains directories and files used for security, clustering, Hibernate, and manually creating HTML wrappers. UninstallerData directory - Contains the uninstaller.
o o

• •

Flex Data Services includes installers for Windows, Linux, and Solaris. It also includes a Java installer to deploy Flex Data Services on other supported platforms. To install Flex Data Services 2 as a J2EE web application: 1. Ensure that your system environment meets the system requirements. 2. Read the Flex Data Services 2 Release Notes for any late-breaking information or updates. 3. If you have the Flex Data Services 2 DVD, insert it into the drive. Otherwise, download the installer file for your platform from the Adobe website or a designated network. 4. Navigate to the installers directory and start the installation program. Do one of the following, depending on your operating system:
o o

Windows - Double-click the installer file. Solaris or Linux - Set the working directory to the directory that contains the installer file, and then enter the installer file for your operating system; for example:
./fds2-lin.bin -i console

5. Accept the license agreement. 6. (Optional) Enter the serial number and follow the prompts. If you don't enter a serial number, Flex Data Services runs in express mode. Note: You can upgrade from express mode to a fully functioning version by entering a serial number in the fds line of the flex-webapp-root/WEBINF/flex/license.properties file (for each Flex Data Services web application) and restarting the server. 7. Select the Flex Data Services J2EE Web Application option. 8. When the installation finishes, view the Readme file for late-breaking information. 9. Install the debugger version of Flash Player from the flex_root/resources/player/debug directory. For Macintosh clients, copy Install Flash Player 9 UB.dmg to the Macintosh and install it. You can optionally copy SAFlashPlayer.dmg to the Macintosh to use the standalone Flash Player. On UNIX and Linux, use these installers to install the debugger version of Flash Player on your Windows clients. 10. Deploy the flex, samples, and flex-admin web applications by using your application-server-specific deployment method. For example, for JRun 4 u6, expand the flex.war, samples.war, and flexadmin.war files to directories named flex, samples, and flex-admin, respectively. Then copy these directories to the root of your JRun server instance. For Tomcat, copy the WAR files to the webapps directory and restart the server. 11. Perform additional application-server specific configuration, as described in Additional server-specific configuration. 12. (UNIX and Linux headless servers only) Open the flex-webapp/WEBINF/flex/flex-config.xml file in a text editor and set the <headless-server> element to true. 13. (Flex Charting 2) You can upgrade from trial mode to a fully functioning version of Flex Charting 2 by entering a serial number in the charting line of the flexwebapp-root/WEB-INF/flex/license.properties file (for each Flex Data Services web application) and restarting the server. To install Flex Data Services 2 as J2EE web application by using the Java installer (any platform): 1. Ensure that your system environment meets the system requirements. 2. Read the Flex Data Services 2 Release Notes for any late-breaking information or updates. 3. If you have the Flex Data Services 2 DVD, insert it into the drive. Otherwise, download the installer file from the Adobe website or a designated network. Note: Due to browser compatibility issues, the downloaded file has the .zip extension. You must change the extension from .zip to .jar. 4. Run the installer by opening a command prompt, navigating to the directory that contains the downloaded JAR file, and executing the following command:
java_home/bin/java -jar downloaded_file_name.jar -i console

5. Set the working directory to the directory that contains the fds2-install.jar file. Enter the following command, replacing java_home with the path to the bin directory for your JRE installation:
java_home /java -jar fds2-install.jar -i console

6. Continue with steps 5 through 13 of To install Flex Data Services 2 as a J2EE web application. Additional server-specific configuration You may need to perform additional configuration steps for the following application servers:
• • • • • •

Tomcat WebSphere 6 JBoss OC4J SAP Running from a compressed WAR

Tomcat To use Flex Data Services 2 with Tomcat, you must also install Java Transaction API (JTA) support. To install the Java Open Transaction Manager (JOTM), which is a fully functional open source stand-alone transaction manager, perform the following steps after deploying the Flex Data Services WAR files: 1. Download JOTM from http://jotm.objectweb.org/. 2. Copy the JAR files from jotm-root/lib to tomcat-root/common/lib. 3. Create a tomcat-root/conf/Catalina/localhost/webapp-name.xml file and add the following lines (assuming a web application name of samples):
4. <Context docBase="${catalina.home}/webapps/samples" privileged="true" 5. antiResourceLocking="false" antiJARLocking="false"> 6. <Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> </Context>

Note: If this file already exists, add the <Transaction> element only. 7. Increase the maximum memory to at least 512MB. 8. (JDK 1.4.x only) Flex Data Services 2 requires an implementation of Java Management Extensions (JMX), which is not provided with JDK 1.4.x. You can download JMX from the Sun web site or use an open-source implementation, such as MX4J. 9. Restart Tomcat.

10. (Optional) To enable custom authentication, follow the instructions in the installroot/resources/security/tomcat/readme.txt file. 11. (Optional) To use an external JMS provider, you must install and configure a JMS provider (such as activeMQ or openJMS) for use with Tomcat. WebSphere Flex Data Services 2 includes a WebSphere-specific implementation of RtmpServer. This version uses threads created by WebSphere. Note (WebSphere 5.1.x): To use the RTMP channel in a dataservice destination that uses transactions, you must install the WebSphere Business Integration Server version, which includes WorkManager. To configure Flex 2 for use with WebSphere: 1. Expand the flex WAR file to a temporary folder:
jar -xvf flex.war

2. Uncomment the resource-ref element for WorkManager in web.xml. This makes the resource available in java:comp/env/ at res-ref-name (java:comp/env/wm/MessagingWorkManager):
3. <resource-ref> 4. <description>Flex Messaging WorkManager</description> 5. <res-ref-name>wm/MessagingWorkManager</res-ref-name> 6. <res-type>com.ibm.websphere.asynchbeans.WorkManager</restype> 7. <res-auth>Container</res-auth> 8. <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref>

9. Map the WorkManager resource-ref in web.xml to the RTMPEndpoint in flexwebapp-root/WEB-INF/flex/services-config.xml. The websphere-workmanagerjndi-name maps to the res-ref-name available in java:comp/env in step 2. For example:
10. <channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel"> 11. <endpoint uri="http://{server.name}:2038/" class="flex.messaging.endpoints.RTMPEndpoint"/> 12. <properties> 13. ... 14. <websphere-workmanager-jndiname>java:comp/env/wm/MessagingWorkManager</websphereworkmanager-jndi-name> 15. ... 16. </properties> </channel-definition>

To configure dataservice destinations that do not use transactions with RTMP based channels, set <use-transactions>false</use-transactions> for the dataservice destination in /WEB-INF/flex/data-management-service.xml. 17. Create a WAR file from the expanded directory structure. For example:
jar -cvf flex.war *

18. From the WebSphere Administrator, define a WorkManager for use by your application. From the admin, choose Resources > Asynchronous Beans > Work managers. By default, the DefaultWorkManager is available at the wm/default jndi-name. Also, you can add a separate WorkManager for your application. 19. Deploy the WAR file. During deployment, map the WorkManager resource-ref to an actual JNDI name for your WorkManager. For the DefaultWorkManager, wm/MessagingWorkManager (name used by your web.xml) maps to wm/default (the JNDI name of the actual server resource). 20. (Optional) To enable custom authentication, open the WebSphere Administrator and configure a custom user registry using the files under installroot/resources/security/websphere/ as usersFile and groupsFile custom properties. JBoss To use custom authentication with Flex Data Services on JBoss, you must perform the following configuration steps: 1. Put install_root/resources/security/tomcat/flex-tomcat-common.jar and install_root/resources/security/tomcat/flex-tomcat-server.jar in the jboss_root/server/default/lib folder. 2. Copy install_root/resources/security/tomcat/context.xml to your web application under the WEB-INF directory or adjust an existing context.xml to add the <Valve>. 3. Restart JBoss. You will now be authenticated against the current JBoss realm. Usually, the default for this authentication stores user information in jboss_root/server/default/conf/users.properties and roles information in jboss_root/server/default/conf/roles.properties. For more information on realms, see the JBoss documentation. For more information on Flex Data Services custom authentication, see the Flex documentation. XPath Issues with JBoss 4.0.3 SP1 There is a conflict with using the JDK5 XPathFactory with the current xerces 2.7.1/xalan 2.6.2 combo that manifests as a "No XPathFctory implementation found for..." error. The xalan JAR file needs to be updated to the 2.7.0 version to correct this. XalanJ Download. For more information, see http://wiki.jboss.org/wiki/Wiki.jsp?page=403UpgradeIssues.

OC4J To run Flex Data Services 2 on Oracle Containers for J2EE (OC4J), you must pass make the following changes in the oc4j.cmd file:
• •

Add the -userThreads argument to the CMDARGS line. Add the –Doc4j.jmx.security.proxy.off=true JVM argument to the JVMARGS line.

The following example shows CMDARGS and JVMARGS lines that use these arguments:
set JVMARGS=%OC4J_JVM_ARGS% -Xmx512m -Doc4j.jmx.security.proxy.off=true set CMDARGS=-config "%SERVER_XML%" -userThreads

SAP NetWeaver SAP NetWeaver requires that Flex Data Services 2 be deployed in an Enterprise Application Archive (EAR) file. To deploy Flex Data Services 2 on SAP NetWeaver, perform the following steps: 1. Create an EAR file that contains the flex.war file, along with the files required by SAP in the ear-root/META-INF folder. 2. Update the NeverCompressed property of the HTTP Provider Service, to include *.swf, application/x-shockwave-flash, application/xml and application/x-amf. 3. Deploy the EAR file. Running from a compressed WAR On some J2EE application servers (such as IBM WebSphere and Tomcat), the deployment process expands the WAR file into a working directory and, from that point forward, the expanded directory is considered to be the application. On other application servers (such as BEA WebLogic), the deployment process expands the WAR file into a temporary directory and conceptually, the application server considers the compressed EAR or WAR file to be the application. Although WebLogic partially supports running from an expanded web application, other features (such as clustering and Production Mode) are only available when running from a compressed application archive. Flex Data Services supports the compressed WAR file deployment model, although you must pre-compile your application, since the the web-tier compiler does not run from a compressed WAR file. To run Flex Data Services 2 from a compressed WAR file, perform the following steps: 1. Expand the flex.war file using winzip or the JAR utility. 2. Create your application, including MXML files, ActionScript files, configuration settings and HTML wrappers.

Note: When running from a compressed WAR, you must run compiled SWF files from within HTML wrappers; you cannot run MXML files directly. For more information on compiling SWF files and creating HTML wrappers, see Building and Deploying Flex 2 Applications. 3. Open the WEB-INF/web.xml file in a text editor. 4. Remove the servlet and servlet-mapping elements for the following: o FlexMxmlServlet o FlexSwfServlet o FlexForbiddenServlet o FlexInternalServlet 5. Locate the servlet definition for MessageBrokerServlet, and update the flex.write.path init-param element to specify an existing, writeable, directory path:
6. <init-param> <param-name>flex.write.path</param-name> <param-value>C:/bea/flex</param-value> </init-param>

7. Create a compressed WAR file from the expanded web application structure. 8. Deploy the compressed WAR file.

Installing Flex 2 SDK
You can install Flex 2 SDK (including the 2.0.1 update) separately. The Flex SDK install, which is delivered as a ZIP file, contains the Flex framework and command-line tools, such as the mxmlc command-line utility, the ASDoc utility (new in 2.0.1), the commandline debugger, and the debugger version of Flash Player. Note: There is no updater for Flex SDK. It is a complete install with updated files. To install Flex 2 SDK : 1. Download Flex SDK ZIP file from the Adobe website. 2. Create a directory to contain the files. 3. Extract the ZIP file to this directory. Flex 2 SDK contains the following directories:
o o

o o o

asdoc - Contains helper files for the ASDoc tool that creates HTML documentation from your MXML and ActionScript source code. bin - Contains the mxmlc, compc, asdoc, and fdb utilities. The bin directory also contains the jvm.config file, which specifies Java settings that you can modify, if necessary. frameworks - Contains compiled framework classes, configuration files, and framework source code. lib - Contains JAR files used by the utilities. player - Contains installers for debugger versions of Flash Player 9. The debugger version reports run-time errors, including errors for undeclared

4. 5. 6.

7.

8.

variables, uncaught run-time exceptions, and operating-system-specific networking errors. o resources - Contains HTML templates for Flash Player detection and history management. o samples - Contains sample applications. Review the readme.htm file. Ensure that Java SDK is installed on the computer and that the java_home/bin directory is defined in the system path. JDK 1.4 or 1.5 is required. For JDK 1.4, JDK 1.4.2_06 or later is required. Install the debugger version of Flash Player from theflex_sdk_root/player/debug directory. For Macintosh clients, copy Install Flash Player 9 UB.dmg to the Macintosh and install it. You can optionally copy SAFlashPlayer.dmg to the Macintosh to install the standalone Flash Player. On UNIX and Linux, use these installers to install the debugger version of Flash Player on your Windows clients. Continue by reviewing the samples. To run the samples, you must first compile them by running the flex_sdk_root/samples/build-samples.bat (Windows) or ./flex_sdk_root/samples/build-samples.sh (UNIX and Macintosh) files. Note: Compiling the samples may take some time. For more information on the Flex compilers, see the "Using the Flex Compilers" chapter in the Building and Deploying Flex Applications manual. For example, to compile the install_root/samples/flexstore/flexstore.mxml file, open a console window, navigate to the install_root/bin directory and issue the following command:
C:\Flex2SDK\bin>mxmlc ../samples/flexstore/flexstore.mxml

Installing Flex Charting 2
The Flex Builder 2 and Flex Data Services 2 installations include a trial edition of Adobe® Flex™ Charting 2. You do not have to install it separately. However, for Flex 2 SDK, you download and install Flex Charting 2 components separately. Note: There is no updater for Flex Charting 2. It is a complete install with updated files. Note: The Flex Builder 2.0.1 and Flex Data Services 2.0.1 update installations include an updated version of Flex Charting 2. You do not need to install it separately. For information on using the Charting components, see the Flex 2 ActionScript and MXML Language Reference or the Flex 2 Developer's Guide, which are available from the Flex Builder Help menu or the documentation download. To install Flex Charting 2: 1. Download the platform-specific Flex Charting 2 installer from the Adobe website:
o

Windows - Executable file (.exe extension).

2. 3. 4. 5.

6. 7.

Macintosh OS X - ZIP file that contains the installer application. UNIX and Linux - Executable JAR file. Run with the java -jar command. Run the Flex Charting 2 installer. Accept the license agreement. Install Charting to the top-level of the SDK directory structure, which places the charts.swc file into the flex_sdk_root/frameworks/libs directory. If you do not install Flex Charting 2 components to the same location as the Flex SDK, you must copy the charting-related files to the corresponding folder structure in the Flex SDK. o Copy the charts.swc file to the flex_sdk_dir/frameworks/libs directory. o Copy the encrypted charting-source.jar file to the flex_sdk_dir/lib directory. o Copy the samples files to the flex_sdk_dir/samples directory. Read the readme_charting.htm file for instructions on how to build the Flex Charting 2 samples. By default, Flex Charting 2 source code is unavailable. To unlock the source code and to remove the "Flex Charting Trial" watermark, you must install a serial number and recompile your files. To install a serial number, perform the following steps:
o o

Open the install_root/frameworks/license.properties file and add the serial number to the charting line, as follows: charting=serial-number 2. Save the license.properties file. 3. Open a command window to the flex_sdk_dir/lib directory and enter the following command:
1. java -jar charting-source.jar ../frameworks ../frameworks/source

The first argument specifies the directory that contains the license.properties file. The second argument specifies where to extract the charting source code. This extracts the charting source code to the flex_sdk_dir/frameworks/source directory. Note: For more information, see the installation instructions in the readme_charting.htm file that you installed.

Installing and configuring Flex Automated Testing
The Flex Automated Testing installer creates the following files and directories:

demo - Contains an Adobe Captivate movie that describes the basics. Be sure to enable audio on your computer.

• • • • • •

frameworks - Contains SWC files and property files. The configuration instructions that follow tell you where to copy these files. resources - Contains the RunTimeLoading.html and runtimeloading.mxml files, which are described in the instruction and configuration instructions that follow. Uninstall Flex Automation - Uninstaller. license_automation.htm - License information. QTP_Plugin_Installer.exe - The installer that QC professionals use to install the Flex plug-in for Mercury QTP. readme_automation.htm - Readme file.

To test applications with Flex Automation, you must install the following:
• • • •

Mercury QuickTest Professional 9.1 Adobe Flex 2 Plug-in for Mercury QuickTest Pro Microsoft Internet Explorer, version 6 or later Flash Player ActiveX control, version 9.0.28.0 or higher

Installing Flex Automated Testing files Tip: These installers are included with Flex Data Services 2.0.1. Additionally, the Flex 3 version works for Flex 2.0.1 applications and is shipped with Flex Builder 3 Professional. To install Flex Automated Testing files: 1. Download the Flex Automated Testing installer from the Adobe website. 2. Run the Flex Automated Testing installer. 3. Accept the license agreement, specify a Flex Data Services license key, and follow the prompts. 4. (Developers) Configure your Flex environment by following the steps outlined in Configuring automated testing support in Flex. 5. (Developers) Test run-time loading by performing the following steps: 1. Compile the runtimeloading.mxml file. See Configuring automated support in Flex for compilation examples. Include the automation SWC files when you compile. The run time loading MXML file is located in the flex_automation_installer/resources directory. You only need to do this once. 2. Deploy the runtimeloading.swf file and its HTML wrapper (RunTimeLoading.html) to a web server. You only need to do this once. 3. Compile the Flex applications that you want to test using standard compiler options. You do not need to include the automation SWC files when you use run-time loading. 4. Deploy your compiled applications to the web server where you deployed the runtimeloading.swf file.

5. In Internet Explorer, request the RunTimeLoading.html file and pass the location of the application you want to test as the value of the automationswfurl parameter; for example:
http://localhost:8700/flex/RunTimeLoading.html? automationswfurl=myapp.swf

6. (QC testing professionals only) Configure QTP by following the steps outlined in Configuring the QTP testing environment. Configuring automated testing support in Flex If you are using run-time loading, you only compile the runtimeloading.mxml file once. Otherwise, before you can pass a Flex application's SWF file to the QC professional, you must recompile it with the Flex automation libraries. For this, you must add automation.swc, automation_agent.swc, and qtp.swc files to the compiler's included libraries before compiling your application. If your applications use charts, you also add the automation_charts.swc file to the included libraries. This section describes how to do this with Flex Builder, the command-line compiler, and web-tier compiler. Testing Flex applications with QTP requires the following SWC files:

• •

automation.swc, automation_agent.swc, and qtp.swc - You deploy these SWC files to the same directory as your other SWC files (typically, the frameworks/libs directory). You must add these SWC files to your include-libraries compiler option. automation_charts.swc - Add this SWC file to your include-libraries compiler option if your application uses charts. automation_agent_rb.swc - You deploy this SWC file to the /locale/en_US directory. This SWC file provides English-language resource bundles for the automated testing messages.

The automation.swc and automation_charts.swc files are already installed with the Flex Data Services or Flex Builder installation. The qtp.swc and automation_agent.swc files are in the flex_automation_installer/frameworks/lib directory after you run the Flex Automation Installer. The automation_agent_rb.swc file is in the flex_automation_installer/frameworks/locale/en_US directory. For all the SWC files except the automation_agent_rb.swc file, you extract them to the frameworks/libs directory (see the instructions below). If you use run-time loading, then you compile only the runtimeloading.mxml file with these libraries. If you use compiletime loading, compile with these libraries for every application you want to test. Flex Builder: To set up Flex Builder to support Flex Automation with QTP:

1. Copy the qtp.swc and automation_agent.swc files from the flex_automation_installer/frameworks/libs directory to flex_builder_dir/Flex SDK 2/frameworks/libs. 2. Copy the automation_agent_rb.swc file from the flex_automation_installer/frameworks/locale/en_US directory to flex_builder_dir/Flex SDK 2/frameworks/locale/en_US. 3. Start Flex Builder. 4. Create a new Flex Project. 5. Select your new Flex project in the Navigator. 6. Select Project > Properties > Flex Compiler. 7. In the "Additional compiler arguments" field, enter the following:
8. -include-libraries "flex_builder_dir\Flex SDK 2\frameworks\libs\automation.swc" "flex_builder_dir\Flex SDK 2\frameworks\libs\automation_agent.swc" 9. 10. 11. "flex_builder_dir\Flex SDK 2\frameworks\libs\qtp.swc" "flex_builder_dir\Flex SDK 2\frameworks\libs\automation_charts.swc"

The include-libraries compiler option is relative to the Flex Builder installation directory; the default on Windows is "C:\Program Files\Adobe\Flex Builder 2\". 12. Click the OK button to save your changes and OK to close the project Properties dialog box. 13. Compile your Flex application. Command-line compiler: To set up the command-line compiler to support Flex Automation with QTP: 1. Copy the qtp.swc and automation_agent.swc files from the flex_automation_installer/frameworks/libs directory to flex_sdk_dir/frameworks/libs. 2. Copy the automation_agent_rb.swc file from the flex_automation_installer/frameworks/locale/en_US directory to flex_builder_dir/Flex SDK 2/frameworks/locale/en_US. 3. Add the automation.swc, qtp.swc, automation_agent.swc, and automation_charts.swc files to the application's library by using the includelibraries compiler option. When you do this, be sure to use the += operator so that your entry is appended to the list of libraries and does not replace it. For example:
mxmlc -includelibraries+=../frameworks/libs/automation.swc;../frameworks/libs/q tp.swc;../frameworks/libs/automation_agent.swc;../frameworks/libs /automation_charts.swc MyApp.mxml

The exact paths depend on the location of the Flex application file relative to the mxmlc command-line compiler and the libs directory. 4. Create an HTML wrapper file using the instructions in the Flex 2 Building and Deploying Flex Applications book. 5. Compile your Flex application. Web-tier compiler: To set up the web-tier compiler with Flex Data Services (FDS) to support Flex Automation with QTP: 1. Copy the qtp.swc and automation_agent.swc files from the flex_automation_installer/frameworks/libs directory to flex_webapp_dir/WEBINF/flex/libs. 2. Copy the automation_agent_rb.swc file from the flex_automation_installer/frameworks/libs directory to flex_webapp_dir/WEBINF/flex/locale/en_US. 3. Open the flex_webapp_dir/WEB-INF/flex/flex-config.xml file. 4. Add the automation_agent.swc, automation_charts.swc, automation.swc and qtp.swc files to the <include-libraries> entry, as the following example shows:
5. <include-libraries> 6. <library>libs/automation.swc</library> 7. <library>libs/automation_agent.swc</library> 8. <library>libs/automation_charts.swc</library> 9. <library>libs/qtp.swc</library> </include-libraries>

10. Restart your FDS server. 11. Compile your Flex application. After you compile the Flex application with the automation testing libraries, you pass the application and the wrapper to the QC professional so that they can run the application with QTP. Typically, you deploy these files to a web server that the QC professional has access to. Configuring the QTP testing environment This section describes the steps necessary for a QC testing professional to configure QTP to work with Flex applications. To configure QTP for use with Flex: 1. Install Flash Player 9 ActiveX control (9.0.28.0 or higher) for Microsoft Internet Explorer. This is currently the only supported player. 2. Install QTP 9.1. You must get QTP 9.1 from Mercury. 3. Restart your computer.

4. Install Adobe Flex 2 Plug-in for Mercury QuickTest Pro with the QTP_Plugin_Installer.exe in the Flex Automation installation directory. This step requires that you have JRE 1.4.2 or later installed. 5. Start QTP. 6. Close QTP. 7. Copy the compiled SWF file and wrapper files to your web server. If you run the SWF file without a wrapper file from the file system rather than from a web server, you must make sure that the file is in the local-trusted sandbox. 8. Start QTP again. The Add-in Manager does not list the Flex plug-in. 9. Select New > Test and click the Record button. NOTE: Flex application testing with QTP currently supports only Microsoft Internet Explorer with the ActiveX Flash Player. For more information on these tasks and using QTP to test Flex applications, see Testing with QTP.

Installing Flash Player 9
Flex 2 applications require Flash Player 9. Flex supports the content debugger version and web version of Flash Player. The content debugger player (also called the debug Flash Player or debug player) displays debugging information during runtime so that you can more easily develop applications. Flex 2 includes the content debugger and web versions of the following Flash Players:
• • • • •

ActiveX control for Internet Explorer Windows plugin for plug-in-based browsers (for example, Mozilla, Firefox, or Netscape) Macintosh plug-in for OS X Windows Standalone player (content debugger only) Macintosh Standalone player (content debugger only)

Tip: Linux desktop users can download a public beta version of Flash Player 9 Update for Linux from Adobe Labs. Upon the public release for Flash Player 9 Update for Linux, the Linux plugin will be available from the Adobe Flash Player Download Center. The following table describes the web versions of Flash Player: Standard Flash Description Player ActiveX control An Flash Player ActiveX Microsoft Internet Explorer. (Windows) Plugin (Windows, A Flash Player browser plugin for Netscape-compatible browsers Macintosh)

Standalone Player (Windows, Macintosh)

An executable application that lets users publish projectors that run SWF files in a separate window so that they feel more like stand-alone applications. The standalone player does not support HTTP authentication or the use of a web proxy, which is required for some Flex applications.

You can download web versions of Flash Player from the Adobe website. The Adobe® Flex™ Builder™ installer prompts you to install one or more content debugger player plugins. The Flex Data Services 2 and Flex 2 SDK installers create a player/debug directory that contains content debugger player installers that you run after installing Flex. The following table describes content debugger players and installers: Debug Flash Player ActiveX Debug Player Description

An ActiveX control for Microsoft Internet Explorer that includes enhanced error reporting and supports the Debugger. The name of the ActiveX Debug Player installer is Install Flash Player 9 AX.exe. A debug player plugin for Netscape or Firefox that includes Plugin enhanced error reporting and supports the Debugger. Available for Debug Windows (Install Flash Player 9.exe) and for Macintosh OS X Player (Install Flash Player 9 UB.dmg). An executable Flash application that lets users create projectors that run Flash files in a separate window so that they feel more like stand-alone applications. This version includes enhanced error Standalone reporting and supports the Debugger. The standalone player does not Debug support HTTP authentication or the use of a web proxy which is Player required for some Flex applications. Available for Windows (SAFlashPlayer.exe) and for Macintosh OS X (SAFlashPlayer application and SAFlashPlayer.dmg). Tip: If you have problems getting the Flash Player ActiveX control to work, try entering the following in a command prompt:
C:> regsvr32 c:\windows\system32\macromed\flash\flash9b.ocx

Uninstalling
Flex Builder Uninstalling Flex Builder 2 on Windows: 1. Select Start > Settings > Control Panel. 2. Select Add or Remove Programs.

3. Click the Adobe Flex Builder version to uninstall (Flex Builder, Flex Builder Plug-in only). 4. Click the Uninstall button in the uninstaller dialog box. 5. Click Done. Uninstalling Flex Builder 2 on Macintosh: 1. 2. 3. 4. Go to the flex_builder_root/Uninstall Adobe Flex Builder 2 folder. Double-click "Uninstall Adobe Flex Builder 2". Click the Uninstall button in the uninstaller dialog box. Click Done.

Flex Data Services Uninstalling Flex Data Services 2 on Windows: 1. 2. 3. 4. 5. Select Start > Settings > Control Panel. Select Add or Remove Programs. Click Adobe Flex Data Services 2. Click the Uninstall button in the uninstaller dialog box. Click Done.

Note: On Windows, Flex Data Services 2 can also be uninstalled using Start > All Programs > Adobe > Flex Data Services 2 > Uninstall Flex Data Services. Unix Run the following shell script to uninstall Flex Data Services 2:
./fds_root/UninstallerData/Uninstall_Adobe_Flex_Data_Services_2

Java If you installed Flex Data Services 2 with the Java installer, use the following command to uninstall:
java -jar /fds_root/UninstallerData/uninstaller.jar -i console

Sign up to vote on this title
UsefulNot useful