This section features a variety of tips that can help you use IBM® Toolbox
for Java™.
Shutting down your Java program
To ensure that your program shuts down properly, issue System.exit(0)
as the last instruction before your Java program ends.
Integrated file system path names for server objects
Your Java program must use integrated
file system names to refer to server objects, such as programs, libraries,
commands, or spooled files. The integrated file system name is the
name of a server object as it might be accessed in the library file
system of the IBM i integrated
file system.
Managing connections in Java programs
It is important to be able to create, start, and end connections
to your server. The following discussion explains concepts central
to managing connections to your server and also offers some code
examples.
IBM i Java virtual machine
The IBM Toolbox for Java classes
run on the IBM Developer Kit for Java (IBM i) Java virtual
machine (JVM).
Independent auxiliary storage pool (ASP)
An independent auxiliary storage pool (ASP) is a collection of
disk units that you can bring online or take offline independent of the rest
of the storage on a system.
Exceptions
The IBM Toolbox
for Java access
classes throw exceptions when device errors, physical limitations, programming
errors, or user input errors occur. The exception classes are based upon the
type of error that occurs instead of the location where the error originates.
Error events
In most cases, the IBM Toolbox
for Java GUI components fire
error events instead of throw exceptions.
Trace class
The Trace class allows the Java program
to log trace points and diagnostic messages. This information helps
reproduce and diagnose problems.
IBM i optimization
There exists two versions of the IBM Toolbox
for Java software, one that is optimized when running
on the IBM i JVM,
and another that runs the same way no matter where the IBM Toolbox
for Java is run.
Performance improvements
With the additional classes provided by IBM i, Java programs
running on the Java virtual machine for IBM i experience improved
performance. Performance is improved in some cases because less communication
function is used, and in other cases, an API is used instead of calling
the server program.
Client installation and update classes
For most installation and update purposes, the IBM Toolbox
for Java classes
can be referenced at their location in the integrated file system on the server.
AS400ToolboxJarMaker
While the JAR file format was designed to speed up the
downloading of Java program files, the AS400ToolboxJarMaker
generates an even faster loading IBM Toolbox
for Java JAR file through its ability to create
a smaller JAR file from a larger one.
Java national language support
Java supports a set of national languages, but it is
a subset of the languages that the server supports.