
Chapter 3 — Developing and Using RFID Applications
58 IF61 Fixed Reader User’s Manual
For more sophisticated Java development, the IF61 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 IF61 each time.
To use OSGi effectively, you need an OSGi server. For more
information, go to www.osgi.org.
Executing Java Applications
To execute a Java application on the IF61, 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 IF61.
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.
Comentarios a estos manuales