Writing
your first Toolbox for Java program
To begin this simple exercise, you must have installed Java on your workstation.
You can decide which version you want to install by reviewing Requirements
for running Java applications.
After you have Java installed on your client, complete the following tasks:
- Copy jt400.jar to the workstation.
- Add jt400.jar to the CLASSPATH on your workstation by appending the full path of the
JAR file to the CLASSPATH. For example, when the jt400.jar file resides in the c:\lib directory on
your workstation (running Windows), add the following to the end of your CLASSPATH statement:
;c:\lib\jt400.jar
- Open a text editor and type the first simple
programming example.
Note: Make sure to leave out the text that refers to the
Notes (for example, Note 1, Note 2, and so on). Save the new document with
the name CmdCall.java.
- Start a command session on your workstation and use the following command
to compile the simple programming example:
javac CmdCall.java
- In the command session, type the following command to run the simple programming
example:
java CmdCall
