Java command in Qshell

The java command in Qshell runs Java™ programs. It is compatible with the java tool that is supplied by Sun Microsystems, Inc. with a few exceptions.

The IBM® Developer Kit for Java ignores these options of the java command in Qshell.

Option Description
-cs This option is not supported.
-checksource This option is not supported.
-debug This option is supported by the iSeries™ internal debugger.
-noasyncgc Garbage collection is always running with the IBM Developer Kit for Java.
-noclassgc Garbage collection is always running with the IBM Developer Kit for Java.
-prof The iSeries server has its own performance tools.
-ss This option is not applicable on the iSeries server.
-oss This option is not applicable on the iSeries server.
-t The iSeries server uses its own trace function.
-verify Always verify on the iSeries server.
-verifyremote Always verify on the iSeries server.
-noverify Always verify on the iSeries server.

On the iSeries server, the -classpath option does not override the default classpath. Instead, it is appended to the system default classpath. The -classpath option does override the CLASSPATH environment variable.

The java command in Qshell supports new options for the iSeries server. These are the new options that are supported.

Option Description
-chkpath This option checks for public write access to directories in the CLASSPATH.
-opt This option specifies the optimization level.
-Xrun[:] A message is displayed, indicating that a service program and an optional parameter string for the JVM_OnLoad function during JVM startup.
-agentlib: Indicates an i5/OS™ service program containing a VM agent. The VM attempts to load the service program from an i5/OS library included in the library list during start up.
-agentpath: Load the library from the absolute path that follows this option. Library name expansion does not occur and the options pass to the agent on start-up.
Start of change-javaagent:<jarpath>[=<options>]End of change Start of changeLoads Java programming language agents for use with the java.lang.instrument package.

jarpath is the path to the agent JAR file. options is the agent options. You can use -javaagent:<jarpath>[=<options>] more than once on the same command line to create multiple agents. More than one agent may use the same jarpath.

End of change

The Run Java (RUNJVA) command in the CL command reference information describes these new options in detail. The CL command reference information for the Create Java Program (CRTJVAPGM) command, Delete Java Program (DLTJVAPGM) command, and Display Java Program (DSPJVAPGM) command contains information about managing Java programs.

The java command in Qshell is available using the Qshell Interpreter.

For more information about the java command in Qshell, see the java tool by Sun Microsystems, Inc.