Running DB2eAppl.java on QNX Neutrino or embedded Linux

This task is part of the main task of Compiling and running sample Java applications on non-Palm OS targets. After you complete these steps, return to Compiling and running sample Java applications on non-Palm OS targets.

Prerequisites

If you have not already set up your system to use the DB2 Everyplace JDBC driver:

  1. Using the export command, include the directory (or directories) that contain the appropriate libdb2e.so and libdb2ejdbc.so native libraries on your device in your LD_LIBRARY_PATH system variable.

Procedure

To run DB2eAppl.java on a QNX Neutrino or embedded Linux device:

  1. Build DB2eAppl.java.

    1. In the Package Explorer pane in the Java Perspective, double-click the wsddbuild.xml file for the DB2 Everyplace Sample project.
    2. In the editor for wsddbuild.xml, click Add Build.
    3. In the Create New Ant Build Target window, click Browse to browse for the main class. In the Select Target window that opens, select DB2eAppl - (default package) - DB2 Everyplace Sample/src, then click Finish.
    4. Back on the Set up build page of the Create New Ant Build Target window, select the appropriate platform from the Platform list, keep the default in the Buildname field, then click Next.
    5. On the Jxelink Options page, keep the defaults and click Finish.
    6. Back in the editor for wsddbuild.xml, select the appropriate build and click Perform Build.
  2. Run DB2eAppl.java.
    1. Copy the appropriate DB2eAppl.jxe file to your device from
      <WSDD>\workspace\DB2 Everyplace Sample\<target>
      

      , where <target> represents the target device and processor type.

    2. Start the application by using the following command:
      j9 -Xbootclasspath:/wsdd/lib/jclMax/classes.zip:/wsdd/lib/jclMax/database_enabler.jar -cp:
      /DB2e/db2ejdbc.jar:. -jxe:DB2eAppl.jxe
      

Return to Compiling and running sample Java applications on non-Palm OS targets.