Installing and running Apogee JREs on Windows CE/Mobile systems requires extra steps due to the lack of the command shell on such systems.  Here, we present the steps needed to enable running Java applications on such targets using Apogee JREs.

Installation.

Apogee JREs are distributed as a plain .zip file that must be transferred to the target system.  The recommended procedure for accomplishing that involves:
  • create \J9 directory on the target system
  • extract the contents of the .zip file on the host system
  • transfer bin & lib directories (on the host) into \J9 folder (on the target) 
    • using Microsoft ActiveSync 4.5 (or similar) software

Running Java Applications.

Graphical nature of Windows CE/Mobile systems prevents specifying arguments to the JRE on the command-line.  Instead, a shortcut (.lnk) file must be created that contains actual command line to be executed.  The shortcut file is composed of a number (up to 255) describing the length of the command line, followed by '#', in turn followed by full command line to execute, e.g.
  • 55#\J9\bin\j9.exe -jcl:foun11 -cp \J9\examples HelloWorld
Browsing for a shortcut file on the target system and double-clicking on it, will invoke the specified command line and run (in the above case) sample HelloWorld application.

Using options file

The shortcut file mechanism used for running Java applications has an inherent limitations of maximum command line being only 255 characters.  Depending on the complexity of the Java application, the limit can easily be exceeded;  in such situations, an options file mechanism must be used.  An options file is a plain text file that contains desired command line options to be passed to the VM.  A shortcut file is then modified to reference options file as one of its arguments, e.g.
  • 84#\J9\bin\j9.exe -jcl:foun11 -Xoptionsfile=\J9\examples\HelloWorld.options HelloWorld
Note that any options starting with -jcl or -X must be in the shortcut (and not options) file.