Running DB2eAppl.java on Windows CE

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, complete the following steps:

  1. Copy the following files to the \Windows directory on your device:<DB2Everyplace>\Clients \WinCE \database \proc \ver \db2ejdbc.dll<DB2Everyplace>\Clients \WinCE \database \jdbc \db2ejdbc.jarwhere proc is the processor type and ver is the version number of the Windows CE operating system on your device.
  2. Using the Windows CE Remote Registry Editor, modify the registry for your device to include the following files on the classpath of the device:
    \Windows\db2ejdbc.jar
    \wsdd\lib\jclMax\database_enabler.jar
    

    assuming you installed J9 under the root directory of your device.

    Alternatively, you can update the DB2eAppl shortcut generated by WSDD to include the above files on the classpath:

    256#"\wsdd\bin\j9.exe" "-Xbootclasspath:\Windows\db2ejdbc.jar;
    \wsdd\lib\jclMax\database_enabler.jar;\wsdd\lib\jclMax\classes.zip;
    \wsdd\lib\jclMax\locale.zip;\wsdd\lib\charconv.zip" "-jcl:max" "-jxe:\Temp\DB2eAppl.jxe"
    

Procedure

To run DB2eAppl.java on a Windows CE device:

  1. Configure your Windows CE device.
    1. Click Devices --> Configure.
    2. In the Device Configurations window, select PocketPC Handheld in the left pane, then click New.
    3. In the configuration that appears on the right, complete the following steps:
      1. In the Device name field, type DB2 Everyplace PocketPC Handheld.
      2. Click Browse for the J9 runtime location field. In the Browse for Folder on Device window, select wsdd (assuming that you installed J9 under the root directory of your device), then click OK.
      3. Click Browse for the Application location install field. In the Browse for Folder on Device window, select Temp, then click OK.
      4. Click Browse for the Shortcut install location field. In the Browse for Folder on Device window, select Temp, then click OK.
    4. Back in the Device Configurations window, click Apply, then click OK.
  2. 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 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 PocketPC ARM from 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. In the editor for wsddbuild.xml, select smartlink ppcarm/DB2eAppl, then click Perform Build.
  3. Run DB2eAppl.java:
    1. Click Run --> Run. The Launch Configurations window opens.
    2. In the Launch Configurations window, select Device Java Application in the left pane, then click New.
    3. In the configuration that appears in the right pane, type DB2eAppl WinCE in the Name field.
    4. On the Main page, complete the following steps:
      1. Click Browse for the Project field. In the Project Selection window, select DB2 Everyplace Sample, then click OK.
      2. Click Search for the Java Application field. In the Select Target window, select DB2eAppl.jxe (Target "smartlink ppcarm/DB2eAppl" in wsddbuild.xml), then click Finish.
      3. Select DB2 Everyplace PocketPC Handheld from the Device or JRE list.
    5. Back in the Launch Configurations window, click Apply, then click Run. You should see output for the sample application in the J9 Console on your device.

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