Prior to running any executable, you must ensure that any mandatory, platform-specific environment variables are set. You may also need to set some optional environment variables, such as CLASSPATH and IBMHPJ_OPTS.
To run an executable:
Example:
In this example, the executable MyAppl has been built using the hpj command. The -main option of the hpj command was used to specify the class MyClass as the main class of MyAppl. It is assumed that the mandatory platform-specific environment variables required to run executables have already been set.
Korn Shell
export IBMHPJ_OPTS="-v"
MyAppl OPT1 OPT2 OPT3
set IBMHPJ_OPTS=-v
MyAppl OPT1 OPT2 OPT3
In this example, the IBMHPJ_OPTS environment variable is set with the -v (verbose) run-time option prior to running the MyAppl executable. The -v option displays a message whenever a simple or compound DLL is loaded to locate a class that is not currently contained within either the executable or within the list of currently loaded DLLs. The command MyAppl is issued to run the executable MyAppl. The options OPT1, OPT2 and OPT3 are supplied as arguments to the main() method of the MyClass class.
Running DLLs with the hpjava Command