Using the first approach, (iSeries specific), he would have to run something similar to the following command:
JAVA CLASS(HelloWorld) CLASSPATH('/MyDir')
In the above HelloWorld is the name of the Java class he wants to run. This class must have a main method. The class path tells where this class and any other classes/Jar files this class depends on. More paths can be added by separating each class path with a colon. For more information refer to the help panels on the command.
The second approach (generic and platform independent):
The executable to run would be /path/to/java. For example, /QOpenSys/QIBM/ProdData/JavaVM/jdk50/32bit/jre/bin/java.
Then he needs to have one or more parameters to specify the class path and the class to run. It is just similar to how one would run a Java program. Each token needs to be added as an argument under the exec task. For example the first argument should be -cp, then the second one should be the actual class path, then the third one should the name of the class without the ".class" extension.
- Support Specialist
- Posts: 75
- Joined: Thu Mar 05, 2009 3:49 pm
- Location: Ashland, NE USA
Who is online
Users browsing this forum: Yahoo [Bot] and 1 guest