Chapter 3 — Develop and Install RFID Applications
IF1 Fixed RFID Reader User Manual 39
For more sophisticated Java development, the reader supports the open
standard OSGi service-oriented architecture. This architecture allows
system administrators to install, uninstall, enable, and disable system
services (also known as bundles) without having to reboot the reader
each time. To use OSGi effectively, you need an OSGi server. For more
information, go to www.osgi.org.
How to Execute Java Applications
To execute a Java application on the reader, use this command:
$JAVA_HOME/bin/java myJAVAClass
How to Execute .JAR Files
To execute .jar files, use this command:
$JAVA_HOME/bin/java myApplication.jar
When you create a .jar file, you need to include manifest files:
• 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.
How to Enable the Java Just-In-Time Compiler
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 make sure that the correct runtime files are used.
$JAVA is the name of the Java runtime executable installed in the
reader.