Execute Java Applications; Java Support For Microsoft Sql Server And Sybase - Honeywell IF2B User Manual

Network reader
Table of Contents

Advertisement

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
Note: Your .jar files must have manifest files included within them, or the command will not
work:
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 installa-
tion 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

Java Support for Microsoft SQL Server and Sybase

The IF2 jTDS driver (version 1.2) provides JDBC capabilities to Java applications
running on the IF2. You need to include the location of JDBC drivers in the class
path. Use the environment variable $JDBC_HOME as shown in this example:
$JAVA_HOME/bin/java -cp $JDBC_HOME/jtds-j2me-1.0.2.jar:. MyClass
The IF2 JDBC driver supports JDBC 1.0 and:
IF2 Network Reader User Guide
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.
Microsoft SQL Server versions 6.5, 7, 2000, and 2005.
Sybase versions 10, 11,12, and 15.
37

Advertisement

Table of Contents
loading

This manual is also suitable for:

If2

Table of Contents