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.

JavaApplicationCall

After establishing a connection to the server from the client, the JavaApplicationCall class lets you configure the following:

  1. Set the CLASSPATH environment variable on the server with the setClassPath() method
  2. Define your program's parameters with the setParameters() method
  3. Run the program with run()
  4. 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

The example in the JavaApplicationCall Javadoc reference documentation shows how to run a program on the server (that outputs "Hello World!") from the client:

JavaApplicationCall