JavaApplicationCall
The
JavaApplicationCall class provides you with the ability to have your client
use the server JVM to run a Java program that resides on the server.
After establishing a connection to the server from the client,
the JavaApplicationCall class lets you configure the following:
- Set the CLASSPATH environment variable on the server 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 IBM Toolbox for Java also provides utilities to call
Java programs that reside on the server. 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 server from the
client that outputs "Hello World!".