Building a CLDC Reference PortCLDC 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 building and running CLDC, see CLDC HotSpot Implementation software documentation. Note: This document is part of the MR2 development release version of phoneME Feature software. The instructions have not been verified or tested. The contents will continue to change as development moves forward.
Building CLDC Software on a Linux/i386 Build PlatformThis section desccribes how to build a default implemenation of the CLDC software. A successful build of CLDC is required to build the phoneME Feature software client. Setting Variables for a Linux/i386 Build Platform To properly build CLDC software on a Linux/i386 build platform, you must set the environment variables shown in TABLE 4-1. Building a default version of the CLDC software creates the executable cldc_vm, for both Linux/i386 and Linux/ARM target platforms. Setting Build Environment Variables for Both Target Platforms
The primary CLDC environment variables,
$ export JVMBuildSpace=$BUILD_OUTPUT_DIR/cldc
ENABLE_PCSL and ENABLE_ISOLATES
are set on the make command line, as shown below.
Building CLDC for a Linux/i386 Target Platform
Building CLDC for a Linux/ARM Target Platform
Building CLDC Software on a Win32/i386 Build PlatformTo properly build the CLDC software on a Windows platform, you must set the environment variables shown in TABLE 4-2. Building a default version of CLDC creates the CLDC software executable cldc_vm.exe, for both the Win32/i386 and Javacall/i386 target platforms.
Setting Win32/i386 Build Environment Variables for Both Target Platforms
Set CLDC build environment variables as shown here:
Note: The variables
Building CLDC for a Win32/i386 Target Platform
$ cd %JVMWorkSpace%/build/win32_i386
$ make ENABLE_PCSL=true ENABLE_ISOLATES=true
The generated CLDC output is found under %JVMBuildSpace%/build/win32_i386/dist.
Building CLDC for a Javacall/i386 Target Platform
$ cd %JVMWorkSpace%/build/javacall_i386_vc
Note: If you have previously built the Javacall porting layer for PCSL, the
$ set JAVACALL_PLATFORM=javacall_i386_vc
$ make ENABLE_PCSL=true ENABLE_ISOLATES=true
The generated CLDC output is found under %JVMBuildSpace%/build/javacall_i386/dist.
Running CLDC SoftwareOnce you build the CLDC software, 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. Running CLDC on a Linux/i386 or Linux/ARM Target Platform
On a Linux/i386 target platform, change to: $ cd $JVMBuildSpace/linux_i386/dist On a Linux/ARM target platform, change to: $ cd $JVMBuildSpace/linux_arm/dist
$ bin/cldc_vm -classpath location-of-compiled-applications/classes classname
For example, to run the
Running CLDC on a Win32/i386 or Javacall/i386 Target Platform
On a win32/i386 target platform, change to: $ cd %JVMBuildSpace%/win32_i386/dist On a Javacall/i386 target platform, change to: $ cd %JVMBuildSpace%/javacall_i386/dist
$ bin/cldc_vm.exe -classpath location-of-compiled-applications/classes classname
For example, to run the
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/i386 and Win32/i386 build platforms.
$ cd $JVMWorkSpace/build/linux_i386
$ 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 first | prev | next-last
|