Running IBM Toolbox for Java classes on the OS/400 Java virtual machine

What follows are special considerations for running the IBM Toolbox for Java classes on the IBM Developer Kit for Java (OS/400) Java virtual machine (JVM):

JDBC

Two IBM-supplied JDBC drivers are available to programs running on the OS/400 JVM:

The IBM Toolbox for Java JDBC driver is best to use when the program is running in a client/server environment.

The IBM Developer Kit for Java JDBC driver is best to use when the program is running on an iSeries server.

If the same program runs on both the workstation and the server, you should load the correct driver through a system property instead of coding the driver name into your program.

Program call

Two common ways to call a program are as follows:

The ProgramCall class of the IBM Toolbox for Java licensed program has the advantage that it can call any iSeries server program.

You may not be able to call your iSeries server program through JNI. An advantage of JNI is that it is more portable across server platforms.

Command call

Two common ways to call a command are as follows:

The CommandCall class generates a list of messages that are available to the Java program once the command completes. This list of messages is not available through java.lang.runtime.exec().

java.lang.runtime.exec() is portable across many platforms, so if your program must access files on different types of servers, java.lang.runtime.exec() is a better solution.

Integrated file system

Common ways to access a file in the integrated file system of the iSeries server:

The IBM Toolbox for Java integrated file system classes have the advantage of providing more function than the java.io classes. The IBM Toolbox for Java classes also work in applets, and they do not need a method of redirection (such as iSeries Access for Windows) to get from a workstation to the server.

The java.io classes are portable across many platforms, which is an advantage. If your program must access files on different types of servers, java.io is a better solution.

If you use java.io classes on a client, you need a method of redirection (such as the iSeries Access for Windows) to get to the server file system.