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 building and running CLDC, see CLDC HotSpot Implementation software documentation.
This section describes how to build a default implementation of the CLDC software. A successful build of CLDC is required to build the phoneME Feature software client.
Setting Variables for a Linux on i386 Build Platform
Building a default version of the CLDC software creates the executable cldc_vm
,
for both Linux on i386 and Linux on ARM target platforms. To properly build CLDC software
on a Linux on i386 build platform, you must set the environment variables shown in
TABLE 4-1.
Setting Build Environment Variables for Both Target Platforms
The primary CLDC environment variables, $JVMWorkSpace and $JVMBuildSpace, are set once, as system variables, for both Linux on i386 and Linux on ARM target platforms. To set these variables, take the following steps:
JVMWorkSpace
variable, as shown here.
$ export JVMWorkSpace=$MEHOME/cldc
JVMBuildSpace
variable, as shown here.
$ export JVMBuildSpace=$BUILD_OUTPUT_DIR/cldc
Building CLDC for a Linux on i386 Target Platform
To build CLDC for the Linux on i386 target platform, take the following steps.
$ cd $JVMWorkSpace/build/linux_i386
Note: You can skip this step and use the make
-C
build option. For
more information, see Building with the
make
-C
Option.
$ make ENABLE_PCSL=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl ENABLE_ISOLATES=true
The generated CLDC output is found under $JVMBuildSpace/linux_i386/dist.
Building CLDC for a Linux/ARM Target Platform
To build CLDC for the Linux on ARM target platform, take the following steps.
$ cd $JVMWorkSpace/build/linux_arm
Note: You can skip this step and use the make
-C
build option. For
more information, see Building with the
make
-C
Option.
$ make ENABLE_PCSL=true PCSL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/pcsl ENABLE_ISOLATES=true
GNU_TOOLS_DIR=$MONTAVISTA
Note: In this command line, the variable $MONTAVISTA
is a shortcut
for a much longer command string, as described
here.
The generated CLDC output is found under $JVMBuildSpace/linux_arm/dist.
Building a default version of CLDC creates the CLDC software executable cldc_vm.exe for the JavaCall porting layer on i386 target platform. To properly build the CLDC software on a Win32 on i386 build platform, you must set the environment variables shown in TABLE 4-2.
Building CLDC for a JavaCall porting layer on i386 Target Platform
JVMWorkSpace
variable, as shown here.$ set JVMWorkSpace=%MEHOME%/cldc
JVMBuildSpace
variable, as shown here.
$ set JVMBuildSpace=%BUILD_OUTPUT_DIR%/cldc
%JVMWorkSpace%/build/javacall_i386_vc
.
$ cd %JVMWorkSpace%/build/javacall_i386_vc
$ make ENABLE_PCSL=true PCSL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/pcsl ENABLE_ISOLATES=true JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall
The generated CLDC output is found under %JVMBuildSpace%/javacall_i386_vc/dist.
Once 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 on i386 or Linux on ARM Target Platform
On a Linux on i386 target platform, use:
$ cd $JVMBuildSpace/linux_i386/dist
On a Linux on ARM target platform, use:
$ cd $JVMBuildSpace/linux_arm/dist
$ bin/cldc_vm -classpath location-of-compiled-applications/classes classname
For example, to run the HelloWorld
application:
$ bin/cldc_vm -classpath /src/classes HelloWorld
Running CLDC on a JavaCall porting layer on i386 Target Platform
$ cd %JVMBuildSpace%/javacall_i386/dist
$ bin/cldc_vm.exe -classpath location-of-compiled-applications/classes classname
For example, to run the HelloWorld
application:
$ bin/cldc_vm -classpath C:/src/classes HelloWorld
You 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 all build platforms.
For example, this could be a Linux on i386 platform, as shown here.
$ cd $JVMWorkSpace/build/linux_i386
$ make docs_html
Viewing phoneME Feature Documents
Use any browser to display the Javadoc tool output file at the following URL:
first | prev | next-last