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:
- 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:
- Build DB2eAppl.java.
- In the Package Explorer pane in the Java Perspective, double-click the
wsddbuild.xml file for the DB2 Everyplace Sample
project.
- In the editor for wsddbuild.xml, click Add
Build.
- 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.
- 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.
- On the Jxelink Options page, keep the defaults and click
Finish.
- Back in the editor for wsddbuild.xml, select the appropriate build
and click Perform Build.
- Run DB2eAppl.java.
- 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.
- 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.