Example: Running a Java application using Proxy Support
The following example shows you the steps to run a Java application
using proxy support.
- Choose a machine to act as the proxy server. The Java
environment and CLASSPATH on the proxy server machine should
include the jt400.jar file. This machine must be able to
connect to the iSeries system.
- Start the proxy server on this machine by typing:
java com.ibm.as400.access.ProxyServer -verbose
Specifying verbose will allow you to monitor when the client
connects and disconnects.
- Choose a machine to act as the client. The Java environment and
CLASSPATH on the client machine should include the
jt400Proxy.jar file and your application classes. This machine
must be able to connect to the proxy server but does not need a
connection to the iSeries system.
- Set the value of the
com.ibm.as400.access.AS400.proxyServer system property to be
the name of your proxy server, and run the application. An easy way
to do this is by using the -D option on most Java Virtual Machine
invocations:
java -Dcom.ibm.as400.access.AS400.proxyServer=psMachineName
YourApplication
- As your application runs, you should see (if you set verbose in
step 2) the application make at least one connection to the proxy
server.