Running DB2eAppl.java on Win32

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 set command, include the following directory in your PATH system variable: <DB2Everyplace>\Clients\Win32\database\x86
  2. 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:

  1. Build DB2eAppl.java:
    1. In the Package Explorer view 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 for the Main class field.
    4. In the window that opens, select DB2eAppl - (default package) - DB2 Everyplace Sample/src, then click Finish.
    5. 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.
    6. On the Jxelink Options page, keep the defaults and click Finish.
    7. Back in the editor for wsddbuild.xml, select smartlink winx86/DB2eAppl, then click Perform Build.
  2. Run DB2eAppl.java.
    1. Click Run --> Run. The Launch Configurations window opens.
    2. In the Launch Configurations window, select Java Application in the left pane, then click New.
    3. In the configuration that appears in the right pane, type DB2eAppl Win32 in the Name field.
    4. 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.
    5. 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.