Developing Echo with Eclipse

If you would like to work on the Echo source, you may find the free Eclipse IDE to be a benefit. Most of Echo3 was developed in this IDE. Eclipse is not in any way required for Echo development.

Deploying Test Applications from within Eclipse

NOTE: This process is somewhat difficult, using Ant to build Echo test WAR files and deploying them to your servlet container yourself is far easier to do.

There are classes contained in the Echo source that will facilitate running various test applications as Java applications. These classes contain a main() method which will start up a new servlet container instance with and automatically deploy a test app to the servlet container. For example, the primary "interactive test app" has an Eclipse test application found at src/server-java/testapp-interactive/eclipse.

There are however some peculiarities to getting such a launcher to work correctly. Most notably the Core.js files and client-side JavaScript application framework files must somehow be copied into a different path at execution time. This is possible using the following steps:

  • In the Project Properties dialog, select Java Build Path and check the box labeled "Allow Output Folders For Source Folders".
  • Set the default output folder to Echo3/tmp/eclipse_build/
  • Ensure the Echo3/src/client/corejs and Echo3/src/client/echo folders are configured as source folders within the project.
  • Ensure Jetty6 is on the Classpath
  • Set the output folder for the Echo3/src/client/corejs and Echo3/src/client/echo to tmp/eclipse_build_js/nextapp/echo/webcontainer/resource/js.
  • Create a new launcher:
    • Select Run menu and selecting Open Run Dialog.
    • Select Java Application in the left-hand pane.
    • Click the New Launch Configuration icon in the upper left corner of the dialog to create a new Java Application launcher
    • Provide a name for the launcher (instead of the default "New_Configuration"), e.g., "Echo Test Application".
    • Specify a main class by clicking the Search button in the "Main Class" area of the dialog. Select an Echo application servlet-container launching class, e.g.: TestAppRun.
    • Select the classpath tab and add the following user entry to the classpath: Echo3/tmp/eclipse_build_js. This will cause the JavaScript files from Core.js and the Echo3 Client-Side Framework to be installed in the correct locations in the deployed application.