Depending on whether you are running an executable or running a DLL with the hpjava command, some environment variables are optional while others are mandatory. Two of the most important optional environment variables discussed in this topic are IBMHPJ_OPTS and CLASSPATH. Information about mandatory environment variables is found in the topic Environment Variables.
Changing Run-Time Options
Run-time options are used to change environment
characteristics. For instance, you can pass a run-time option to
specify that you want to display verbose information during class
loading. Run-time options are passed to the HPCJ run-time system
in one of two ways:
Syntax specified for run-time options passed to the hpjava command is essentially the same as for options specified by setting the IBMHPJ_OPTS environment variable. For example, if you want to specify the run-time option -v (verbose) on the hpjava command and preload the compound DLL Animator.jll, you could use the following command syntax:
hpjava -load Animator.jll -v Animator
If you want to specify the run-time option -v (verbose) and run the executable Animator, use the following command syntax:
Korn Shell
export IBMHPJ_OPTS="-v"
Animator
set IBMHPJ_OPTS=-v
Animator
Since IBMHPJ_OPTS is an environment variable, it may be necessary to set or reset it for the runs of different executables or between the runs of the same executable.
Changing the Classpath Setting
At run time, classes that are compiled into one or more
DLLs are located using the classpath setting. There are two ways
to change the classpath setting:
In determining the classpath setting, HPCJ first looks to see if you have specified the -classpath option. If you have specified -classpath classpath, then HPCJ accepts the value of classpath as the classpath setting. If, however, you have not specified the -classpath option, then HPCJ uses the value of the CLASSPATH environment variable as the classpath setting. For example, if you have set the CLASSPATH environment variable, then HPCJ assumes that the classpath setting is whatever value you specified. If you have not set the CLASSPATH environment variable and the current value is null, then the current directory (.) is used as the value.
Regardless, the classpath setting is always appended with the location of the compiled versions of the HPCJ-supplied classes.