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 set command, include the following directory in your PATH system
variable: <DB2Everyplace>\Clients\Win32\database\x86
- Using the set command, include the following file in your CLASSPATH system
variable:
<DB2Everyplace>\Clients\Win32\database\jdbc\db2ejdbc.jar
Note: If WSDD is open, you will need to restart it for these changes
to be reflected in WSDD.
Procedure
To run DB2eAppl.java on a Windows workstation:
- Build DB2eAppl.java:
- In the Package Explorer view 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 for the
Main class field.
- In the window that opens, select DB2eAppl - (default package) - DB2
Everyplace Sample/src, then click Finish.
- Back in the Create New Ant Build Target window, select J9 for Windows X86
in 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 smartlink
winx86/DB2eAppl, then click Perform Build.
- Run DB2eAppl.java.
- Click Run --> Run. The Launch Configurations window
opens.
- In the Launch Configurations window, select Java Application in the left
pane, then click New.
- In the configuration that appears in the right pane, type DB2eAppl
Win32 in the Name field.
- On the Main page, complete the following steps:
- Click Browse for the Project field. In the
Project Selection window, select DB2 Everyplace Sample, then click
OK.
- Click Search for the Main class field. In the
Choose Main Type window, select DB2eAppl, then click OK.
- Back in the Launch Configurations window, click Apply, then
click Run. You should see output for the sample application
in the WSDD Console.
Return to Compiling and running sample Java applications on non-Palm OS targets.