EasyManua.ls Logo

Intermec 1009FF01 - Execute Java Applications

Intermec 1009FF01
119 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4 — Install Applications on the IF2 with Expanded Memory Option
54 IF2 Network Reader User Manual
For more sophisticated Java development, the IF2 supports the open
standard OSGi service-oriented architecture. This allows system
administrators to install, uninstall, enable, and disable system services
(also known as bundles) without having to reboot the IF2 each time.
To use OSGi effectively, you need an OSGi server. For more
information, go to www.osgi.org.
Execute Java Applications
To execute a Java application on the IF2, use this command:
$JAVA_HOME/bin/java myJavaClass
To execute .jar files, use this command:
$JAVA_HOME/bin/java -jar myApplication.jar
To enable the Java just-in-time (JIT) compiler for maximum
performance, use this command:
$JAVA_HOME/bin/java -jit java -jar MyJar.jar
where:
$JAVA_HOME is an environment variable that indicates the Java
runtime installation path (/usr/java). Always use this variable for
simplicity and to insure that the correct runtime files are used.
java is the name of the Java runtime executable installed in the IF2.
If your application references third party Java libraries (such as
components from the Intermec RFID Resource Kit), you must use the
“-cp” option to specify the class path for the JVM to find the Java
classes. Be sure to include the current path so classes in the current
directory can be found, as shown in this example:
$JAVA_HOME/bin/java -cp .:./BasicRFID.jar MyClass
Note: Your .jar files must have manifest files included within them, or
the command will not work:
The manifest needs to include an attribute called “Main-Class” to
specify the application’s entry point (for example, Main-Class:
MyJavaClass).
If the executable .jar needs to reference other .jar files, specify the
files in the manifest file using the “Class-Path” attribute.

Table of Contents

Related product manuals