AS/400 Toolbox for Java \
Access classes \ Java
applicationcall
JavaApplicationCall
The
JavaApplicationCall class provides you with the ability to
easily run a Java program residing on the AS/400 from a client with
the Java virtual machine for AS/400.
After establishing a connection to the AS/400 from the client,
the JavaApplicationCall class lets you configure the following:
- Set the CLASSPATH environment variable on the AS/400 with the
setClassPath() method
- Define your program's parameters with the
setParameters() method
- Run the program with
run()
- Send input from the client to the Java program. The Java
program reads the input via standard input which is set with the
sendStandardInString() method. You can redirect standard output
and standard error from the Java program to the client via the
getStandardOutString() and
getStandardErrorString()
JavaApplicationCall is a class you call from your Java program.
However, the AS/400 Toolbox for Java also provides utilities to
call AS/400 Java programs. These utilities are complete Java
programs you can run from your workstation. See
RunJavaApplication class for more information.
Example
This
example shows you how to run a program on the AS/400 from the
client that outputs "Hello World!".