Building a CLDC Reference Port (MR1)CLDC software is an OSS community version of Sun Microsystems' Connected Limited Device Configuration HotSpot Implementation virtual machine. Although primarily created from the same shared code base, Sun Microsystems' commercial product might not fully and accurately represent the OSS source base, due to licensing and other legal restrictions. This document has the following sections:
For more information about CLDC, see CLDC HotSpot Implementation software documentation. CLDC Build EnvironmentThis chapter provides basic instructions for building the CLDC software, which is needed to build the phoneME Feature software. Many CLDC software build configurations and options are possible. This guide describes how to build a default implementation only. Setting Variables for a Linux Platform Note: This document assumes the use of the Bash shell on the Linux platform. If you are using some other shell, set the variables for the shell you are using. To properly build CLDC software on a Linux build platform, you must set the environment variables shown in TABLE 4-1. For more information on setting other Linux build environment variables, see Setting Up the Linux Build Environment. Once the variables in TABLE 4-1 are set, no other Linux build environment set up is needed.
For example, to set the variable JVMWorkSpace as a system variable, enter this command: $ export JVMWorksSpace=/development/openvm/linux To set JVMWorkSpace on a make command line, enter this command: $ make JVMWorkSpace=/development/openvm/linux Setting Variables for a Windows Platform Note: This document assumes the use of Cyg4Me on the Windows platform. To properly build the CLDC software on a Windows platform, you must set the environment variables shown in TABLE 4-2. For more information on setting other Windows build environment variables, see Setting Up the Windows Build Environment. Once the variables shown in TABLE 4-2 are set, no other build environment setup is needed.
For example, to set JVMWorkSpace as a system variable, enter this command: $ set JVMWorkSpace=C:/development/openvm/win32 To set JVMWorkSpace on a gnumake command line, enter this command: $ make JVMWorkSpace=C:/development/openvm/win32
Building CLDC SoftwareThe default CLDC software build mode is Debug. Building a default version of the CLDC software creates a debuggable version of the CLDC software executable (cldc_vm_g on Linux and cldc_vm_g.exe on Windows). The debug build version executes relatively slowly, but is valuable for testing and debugging the system. After building the CLDC system, follow the instructions in Running CLDC Software to run it. Building CLDC for a Linux Platform Note: This document assumes the use of the Bash shell on the Linux platform. If you are using some other shell, set the variables for the shell you are using.
For more information, see Setting Variables for a Linux Platform.
Building CLDC for a Windows Platform Note: This document assumes the use of Cyg4Me on the Windows platform.
For more information, see Setting Variables for a Windows Platform.
Building CLDC DocumentationYou can create HTML documents from CLDC porting interfaces. To do this for the CLDC software, use the make docs_html build target. Generating Javadoc Tool Documentation Building Javadoc tool documentation is the same for both Linux and Windows platforms.
$ cd $JVMWorkSpace/build/platform
$ make docs_html The generated HTML documents are put in the following directory: $JVMBuildSpace/doc/javadoc/html Viewing phoneME Feature Documents Use any browser to display the Javadoc tool output file at the following URL: file:///$JVMBuildSpace/doc/javadoc/html/index.html
Running CLDC SoftwareOnce you build a debug version of CLDC, you can invoke it from the command line to run a class compiled from the Java programming language. The path to the executable depends on the target platform (operating system and processor) for which you build the software. Note: Many more command options are available to run the CLDC software, on both Linux and Windows platforms, than shown here. For more information, see CLDC HotSpot Implementation Build Guide. Running CLDC on a Linux Platform
$ cd $JVMBuildSpace/linux_arm
$ bin/cldc_vm_g -classpath location-of-compiled-applications/classes classname Running CLDC on a Windows Platform
$ cd %JVMBuildSpace%/win32/i386
$ bin/cldc_vm_g.exe -classpath location-of-compiled-applications/classes classname
|