Platform Deployment Tips

This document covers deployment tips for particular JVMs.

Contents:


Topic Conventions

This section describes the general topics for each JVM discussed in this document.

Basic Settings

This section includes a table that lists the basic configuration settings for mBS that are supported by the JVM.

Security Settings Notes

This section contains notes relating to the mBS framework system property mbs.security described within the "System Properties" document. Available options for this setting are none, jdk12, and custom. If the security model implemented by the JVM is not supported by mBS, or the JVM does not support security, none will be listed. When enabling security with your own custom implementation (the mbs.security should not be specified or should be set to none), be sure to specify the implementation with the system property mbs.security.class as well.

Native Library Storage Notes

This section contains notes relating to how the particular JVM handles native library storage, as well as notes regarding the mBS framework system property mbs.storage.native. Available options for this property are jdk11 and jdk12, the latter being the default value. If it is set to jdk11, the additional system property mbs.storage.nativedir must be considered as well. More information on both of the settings can be found in the "System Properties" document.

File Formats Notes

This section lists the different archive formats that the JVM recognizes, specifically JAR, JXE, and Tao native. This corresponds to the mBS bundle system property mbs.loader.type, described within the "System Properties" document.

Precompilation Options (available for certain JVMs in certain file formats)

Command Line Notes

This section covers JVM command line arguments used for customizing target environment.

JVM Configuration Notes

This section covers commonly used build options when compiling the JVM for embedded platforms that will run mBS.

Framework Configuration Notes

This section details specific options and settings that may impact runtime behavior of mBS.

Additional Notes

This section includes any additional details pertinent to the JVM or running mBS.


Cee-J (Skelmir)

This section contains guidelines for CEE-J version 2.7.

Basic Settings

Security Settings Native Library Storage File Format Support
none jdk11 JAR

Framework Configuration Notes

When running mBS on the CEE-J VM with enabled resource management, the mbs.threads.fix system property must be set to true in order to use some VM-specific techniques for resource management.

Another important system property to use is mbs.loader.setsigners, which on the CEE-J VM should be false.

More information on the above mBS settings is available in the "System Properties" document.


CVM (Sun)

These settings are for CVM version 1.0.1 and 1.1.

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk12 JAR

Command Line Notes

-Xms<value> - Used to set the memory allocation poolsize in bytes. The suffixes "k" and "m" may be used to specify the value in kilo or megabytes respectively. Default value for this is 4m.
-Xss<value> - Used to set the thread stack size in bytes. As with the -Xms option, value may use the "k" and "m" suffixes.

JVM Configuration Notes

When building an implementation of Sun's CVM, the developer has the option of including components relevant to the deployment environment. The developer can change what is included in the implementation by selecting specific "Profiles", which are used to describe the environment that the JVM is going to run in. It also includes and/or excludes specific resources, which a vendor may either not require, or may have a type-specific implementation designed for.

J2ME_CLASSLIB is the build option for using a profile.

OPT_PKGS is the build option for including optional packages with the build of CVM. This option requires that a profile is used.

Framework Configuration Notes

Available resource manager implementations: Default Resource Manager, JDK 1.5 Resource Manager.

If using CVM 1.1, to activate the management of thread resources of the mBS framework, the framework system setting mbs.resman.class should be set to

More information about mBS resource management is available in the "Resource Management" and "System Properties" documents.

 

Additional Notes

Currently, CVM represents Sun's mobile device Java environment, following the J2ME specifications.


Intent (Tao Group)

This section contains guidelines for version 1.3.3 of the Tao VM.

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk12 JAR, Tao native

File Format Notes

If using Tao native file format, supported by the Standard Version of the framework, the system property mbs.loader.type should be set to tao. More information on this mBS setting is available in the System Properties document.

Command Line Notes

Runtime command line arguments for memory allocation are as follows.

-M<value> - Used to set initial memory usage in k (4096 kb default).
-U<value> - Used to set the memory increment size in k (4096 kb default).
-X<value> - Used to set maximum memory usage in k (131072 kb default).
-T0 - Used to disable tracing.

JVM Configuration Notes

Optimization of the Tao VM requires building an image for the target device. Please refer to specifics within the Tao documentation for the sysbuild and sysgen applications. However, here are some basic options to consider.

The following values can be set in the platform sysbuild configuration file, platform.sys, within the setup stage.

There are numerous other values that can be set and may have an effect on the target system, such as defining the type of memory required, the type of file system required, and setting hardware requirements (sound, video, ports, etc).

.memory can be used to configure the memory stage. This instruction allows the developer to allocate available memory, and specify details regarding its usage. Within this instruction are flags for setting the name of the memory object, its size, base address, attributes, as well as more advanced instructions for defining static loaded data and determining its usage.

When building the actual image file, the -s command line argument will remove debugging information from tools.

Framework Configuration Notes

Make sure also to set the mbs.cl.tao.fix system property to true to enable correct loading of classes.

When running mBS on Tao Intent with enabled resource management and with mbs.cl.tao.fix equal to false, the mbs.threads.fix system property must be set to true in order to use some VM-specific techniques for resource management. More information on this mBS setting is available in the "System Properties" document.

Tao does not use system defined classpaths. All command line paths need to be declared in absolute terms.


J9 (IBM)

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk12 JAR, JXE

File Formats Notes

When compiling bundles in JXE format, be sure to check the SmartLinker (for J9 2.2) command line options for creating files that are compatible with the specifics of the target device. Some of the options available are as follows.

-le - File created is Little Endian byte format. This is default for SmartLinker.
-be - File created is Big Endian byte format.

Command Line Notes

The J9 VM comes preconfigured with optimization settings specific to the target platform, in terms of CPU and OS. Default values for the following will vary between platforms. These settings can be modified with the following command line arguments.

Basic J9 Command Line Options

This section contains the most useful command line options for running the mBS framework on J9 2.2 and J9 2.3.

-Xint - If present runs only interpreted code and not precompiled code. Equivalent to -Xnoat.
-Xgcpolicy:optavgpause - Used to reduce the time of garbage collection pauses and to limit the effect that the increased heap size has on the garbage collection pause. This option is suitable for platforms with large heaps.

Values for the following options are expressed in bytes. The suffixes "k" and "m" may be used to specify the value is in kilo- or mega-bytes respectively.

-Xmca<value> - Used to set RAM class segment increment.
-Xmco<value> - Used to set ROM class segment increment.
-Xmn<value> - Used to set new space size.
-Xms<value> - Used to set old space size.
-Xmo<value> - Same as -Xms.
-Xmoi<value> - Used to set old space increment.
-Xmx<value> - Used to set memory maximum.
-Xmso<value> - Used to set OS thread stack size.
-Xmr<value> - Used to set remembered set size.
-Xiss<value> - Used to set initial Java thread stack size.
-Xss<value> - Used to set maximum Java thread stack size.

Example Settings

-Xmca8K -Xmco8K -Xmoi128K -Xmn256K -Xmo512K

JVM Configuration Notes

IBM recommends that the JAVA_HOME variable not be set. This value is generally set to the root directory of the J9 runtime installation. Default value is one directory above where the actual VM can be found. This setting ensures that certain files such as classes.zip, locale.zip, and charconv.zip can be found.

Framework Configuration Notes

Available resource manager implementations: Default Resource Manager, J9 Resource Manager.

If using the resource management capabilities of J9 jclRM, the framework system setting mbs.resman.class should be set to

for J9 2.x.

More information about mBS resource management is available in the "Resource Management" and "System Properties" documents.

Another important setting for using the mBS on J9 is the mbs.loader.setsigners system property, which must be false for J9, as described in the "System Properties" document.

If using JXEs, the system property mbs.loader.type should be set to jxe22 for J9 2.2 and J9 2.3. Refer to the "System Properties" document for more information on this setting.

Make sure to use the -Xbootclasspath command line argument when starting the framework, and that the starting class is not specified in the command line. Also refer to the J9 documentation for additional information.


JDK (Sun)

Basic Settings

Version Security Settings Native Library Storage File Format Support
1.1 none jdk11 JAR
1.2 and higher jdk12 jdk12 JAR

Command Line Notes

-Xms<value> - Used to set initial Java heap size.
-Xmx<value> - Used to set maximum Java heap size.
-Xss<size> - Used to set Java thread stack size.

Framework Configuration Notes

Available resource manager implementations: Default Resource Manager, JDK 1.5 Resource Manager.

If using the JDK 1.5 and later, to have management of active threads, the framework system setting mbs.resman.class should be set to

More information about mBS resource management is available in the "Resource Management" and "System Properties" documents.

Another important setting for using the mBS framework JDK1.1.x is the mbs.loader.setsigners system property taht should be set to true. Refer to the "System Properties" document for a more detailed description on the property.


Jeode (Esmertec)

This section provides guidelines for Jeode 1.11.

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk11 JAR

Security Settings Notes

When starting mBS on Jeode, make sure that jeode.security is set to true.

Command Line Notes

Jeode supports many property settings. These settings may be declared in 2 different ways.

The following memory system properties may be important for embedded devices running mBS.

In addition to these settings, Jeode also supports the following command line arguments.

-ms<value> - Similar to jeode.evm.memory.sysStart described above.
-mx<value> - Used to set the maximum size for the Java heap.
-noverify - Used to turn off bytecode verification.
-oss<value> - Used to specify the size of the native stack.
-ss<value> - Used to specify the size of the Java stack.

There are numerous other configuration settings for different components such as the runtime compiler, local and remote console settings, debugging, and others. Please refer to the Jeode documentation for more information.

Framework Configuration Notes

When the mBS framework is running on the Jeode VM, the mbs.loader.setsigners system property should be set to true. Refer to the "System Properties" document for a more detailed description on the property.


JSCP (NSIcom)

This section contains guidelines for version 3.22 of the JSCP VM.

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk11 JAR

File Format Notes

c2ROM is a utility that can convert Java classes into VM native code. Please see the JSCP documentation for more information on this tool.

f2ROM is a utility that can convert any files other than Java classes for inclusion within an application ROM image.

Command Line Notes

-mi - Allows multiple instances of JSCP to run concurrently.
-ml<value> - Sets the Java memory limit in KB.
-noverify - Turns off class verification.
-nojit - Disables JIT.
-D<name>=<value> - Sets Java system property <name> to value <value>.

JVM Configuration Notes

Please refer to the JSCP user documentation for configuring and implementing the the .c and .h files that will include custom runtime configuration information.


Kaffe (kaffe.org)

This section contains deployment tips for version 1.1.4 of the Kaffe VM.

Basic Settings

Security Settings Native Library Storage File Format Support
none jdk11 JAR

Command Line Notes

-ss - Used to set the maximum stack size.
-mx - Used to set the maximum heap size.
-ms - Used to set the initial heap size.


Perc (NewMonics)

This section provides tips for mBS deployment on the Perc VM version 4.2.0.

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk11 JAR

File Format Notes

Perc supports JIT and AOT compilations. Please refer to the PERCAccelerator for compiling code with these options. NewMonics suggests removing JIT from the Perc VM and using AOT compilation for bundles. The effect is reduced ROM memory footprint with the speed benefits of JIT (via AOT).

Command Line Notes

-js <value> - Used to set the initial size of the Java stack. Value is in bytes.
-numregs <value> - Used to set the initial number of memory regions created.
-maxregs <value> - Used to set the maximum number of memory regions to use.
-regsize <value> - Used to set the memory region size. Value is in MB.

JVM Configuration Notes

For resource constrained devices, NewMonics recommends building a custom version of the Perc JVM tailored to the particular environment. This allows the developer to include such options as AOT, JIT, as well as altering default classes and startup applications. Please refer to the Perc documentation for more details.


PJEE (Sun)

The section contains deployment tips for version 3.1 of the PJEE VM.

Basic Settings

Security Settings Native Library Storage File Format Support
jdk12 jdk11 JAR

Additional Notes

There are several different products that are related to PersonalJava that bear mentioning here to avoid confusion.

PJava, also known as PJAE or PersonalJava Application Environment: This is the PersonalJava JVM specification produced by Sun for use on mobile devices. In addition to this, there are several other products that are also commonly referred to as PJava, although they are actually just VMs that implement the PersonalJava specification produced by Sun.

This product has been discontinued by Sun, in favor of their later embedded device specification J2ME. Please see notes on CVM for implementation with this new specification.

Personal Java Emulation Environment, also known as PJEE: PJEE is a Personal Java emulation environment designed for emulating Personal Java running on an embedded device.


References


Deployment