Accessibility

Table of Contents

Getting started with BlazeDS

Setting up your BlazeDS environment

Step 1: Install and start the BlazeDS Turnkey Server

The BlazeDS turnkey server is a ready-to-use version of Tomcat (currently version 6.0.14) in which the BlazeDS data services have already been deployed along with sample applications.

Note: The goal of the turnkey server is to give developers an easy way to run samples out-of-the-box. In your real-life development or production environment, you would typically integrate BlazeDS in your own web application on your own application server.

To install the BlazeDS turnkey server:

  1. Make sure that you have the JDK 1.5 or higher installed, and that you have a JAVA_HOME environment variable pointing to your Java Development Kit installation.
  2. Download blazeds-turnkey-<version>.zip
  3. Expand blazeds-turnkey-<version>.zip

    Note: The instructions in this tutorial assume that you expand blazeds-turnkey-<version>.zip in /blazeds. If you expand the zip file anywhere else make sure you adjust the path provided in these instructions accordingly.

  4. Start Tomcat
    1. Open a command prompt window
    2. Navigate to /blazeds/tomcat/bin
    3. Execute the following command:

      catalina run

Step 2: Install Eclipse and the Flex Builder 3 plug-in

Note: You can skip this step if Eclipse and the Flex Builder 3 plug-in are already installed on your system.

Because you will work on both the client side and the server side of the applications built in this tutorial, you need to use Flex Builder plug-in configuration and install Flex Builder 3 on top of Eclipse. You cannot use the Flex Builder standalone configuration because it is built on top of a minimal version of Eclipse that does not include the Java development environment. As a result it does not allow you to work on the Java-based server side of your applications.

To install the Flex Builder 3 plug-in:

  1. Install Eclipse. You can download Eclipse at: http://www.eclipse.org/downloads/. If you are not sure which version to download, choose the “Eclipse IDE for Java Developers”, or the “Eclipse Classic” version.
  2. Install the Flex Builder 3 plug-in.

Step 3: Create a Java project

You will need a Java project to work on the server side of the applications built in this tutorial. There are several ways you can set up Eclipse to work on the Java classes of a Web application. You can use a simple Java project, work with the Web Tools Platform (WTP), or use other plug-ins such as MyEclipse. In this tutorial, to avoid dependencies on a specific plug-in, we use a simple Java project.

  1. In the Eclipse menu, choose File > New > Project.
  2. Select Java Project in the project type tree and click Next.
  3. On the “Create a Java Project” page of the wizard:
    • Enter “blazeds-server” as the project name.
    • Select Create project from existing source, and enter “C:\blazeds\tomcat\webapps\samples\WEB-INF”.
    • Click Next.
  4. On the Java Settings page, make sure that the Default output folder is “blazeds-server/classes”, and click Finish.

This project configuration allows you to store the source code for your Java classes in the WEB-INF/src directory. These classes will automatically be compiled in the WEB-INF/classes directory.