Chapter 1. Java overview and iSeries implementation 19
The SLIC implementation of the JVM uses the native thread support that was new with the
V4R2 release of OS/400. It also supports JNI calls to user-written ILE C or C++ native
methods that are packaged in service programs (*SRVPGM).
1.4.2 Java APIs and the iSeries server
The Java Core Library APIs, as defined in Sun Microsystems, Inc., are packaged as a
separate, no charge, Licensed Program Product (LPP) that you must install on your system to
run Java applications on the iSeries server. You need to install the IBM Developer Kit for Java
(5769-JV1 in V4R5 and prior releases) or (5722-JV1 in V5R1) LPP product by using the
standard OS/400 Install Licensed Program procedures. This is a skip release LPP that
follows Sun Microsystems, Inc. JDK future versions as closely as possible, independently
from OS/400 versions and releases whenever possible.
The
java.io APIs are linked to the integrated file system support of OS/400 and provide
access to any UNIX or PC-style stream file within the integrated file system.
The
java.net APIs use the standard TCP/IP support that is provided by the TCP/IP
Connectivity Utilities for iSeries (5769-TC1) or (5722-TC1 in V5R1) LPP product. You must
install this no-charge LPP on your system before using Java on your iSeries server.
The
java.sql APIs use the standard Structured Query Language (SQL) Call Level Interface
(CLI) of OS/400 to access the iSeries database.
The
java.awt APIs use the Remote AWT support of the iSeries JVM to route any GUI
operation to a workstation. This is because there are no GUI-capable devices on the iSeries
server. See 1.5, iSeries-specific implementation on page 22, for more details on Remote
AWT.
1.4.3 Java utilities and the iSeries server
Most Java utilities are supported on the iSeries server. They are run from within Qshell
Interpreter. The Qshell Interpreter is an option of OS/400 that you must install on your iSeries
server to run any Java utility on your system. Refer to 1.5.2, The Qshell Interpreter on
page 32, for more details on Qshell Interpreter.
As of V4R4, the
qsh command supports these Java utilities:
򐂰 java
򐂰 javac
򐂰 javah
Important: Although there is no way to prevent a Java program from starting a native ILE
C method, which, in turn, calls an RPG or COBOL program, it is not supported in V4R2 or
V4R3, because RPG and COBOL are not thread safe. Calling a non-thread safe function
from within a threaded environment may cause unpredictable results to occur and should,
by all means, be avoided. However, starting with V4R4, you can use RPG and COBOL in
native methods and threads, because they are thread safe. For more information about
using JNI on the iSeries server, see Chapter 11, Java Native Interface (JNI) on page 439.
Not all OS/400 system functions are thread safe. Therefore, using the JNI support to
invoke a C function that calls a non-thread safe OS/400 system API may also cause
unpredictable results to occur. The System API Reference V4R4, SC41-5801, manual has
been updated to reflect the thread safe status of every system API. Please refer to this
manual before using any system API through the Java JNI support of OS/400.

Get Building Java Applications for the iSeries Server with VisualAge for Java 3.5 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.