Environment Variables
Prior to running any program compiled with HPCJ, you must
ensure that you have set your environment variables. Some of the
environment variables are mandatory and others are optional,
depending on whether you are running executables or running DLLs
with the hpjava command. Mandatory environment
variables are discussed below. Information about optional
environment variables is found in the topic Changing Environment
Settings.
To set mandatory environment variables, you can use the setenvhpj
command. You can display usage information for this command by
issuing the following command in the bin subdirectory of the
ibmhpj directory:
setenvhpj
To set the mandatory environment variables in the current
shell, issue the following command found in the bin subdirectory
of the ibmhpj directory (where path is the absolute path
of the ibmhpj directory):
setenvhpj
path
Sets the PATH environment variable to include the bin
subdirectory of ibmhpj.
setenvhpj
path
Sets the PATH and BEGINLIBPATH environment variables to
include the bin subdirectory of ibmhpj.
.
setenvhpj path
Sets the following environment variables in the AIX Korn
shell:
- Sets IBMHPJ_HOME to include the path of the ibmhpj
directory.
- Sets LIBPATH to include the path of the lib subdirectory
of ibmhpj.
- Sets PATH to include the bin subdirectory of ibmhpj. This
optional environment variable is set by setenvhpj
as a convenience.
Environment Variables Used by Executables
When you run Java programs that were compiled into executables
using HPCJ, there are several environment variables that are used
by the HPCJ run-time system:
- The optional IBMHPJ_OPTS environment variable passes
run-time options to the HPCJ run-time system for such
things as properties. The value of this environment
variable has the same syntax as the hpjava
command options. Additional information about the hpjava
command options is found in the topic hpjava Command.
The PATH environment variable locates the DLL that
contains the core Java run-time services.
The BEGINLIBPATH and ENDLIBPATH environment variables are
used to locate the DLL that contains the core Java
run-time services. Specifically, these environment
variables are used to append directories to the beginning
or the end of the LIBPATH setting in the CONFIG.SYS file.
The LIBPATH environment variable is used to locate the
DLL that contains the core Java run-time services. The
IBMHPJ_HOME environment variable is used to locate the
versions of the HPCJ-specific Java class libraries
supplied with HPCJ. It is also used to locate property
files and other files required by the run-time system.
Environment Variables Used by the hpjava Command
When you run compiled Java applications using the hpjava
command, certain environment variables may be used by the HPCJ
run-time system. However, in contrast to its use with
executables, the IBMHPJ_OPTS environment variable is not used for
establishing run-time options. Instead, run-time options are
passed as arguments to the hpjava command.
Additional information about the hpjava command
is found in the topic hpjava
Command.
The HPCJ run-time system uses the following environment
variables:
The PATH environment variable must include the bin
subdirectory of the ibmhpj directory. This enables the
HPCJ run-time system to locate the required DLL, which
contains the code that implements the core Java run-time
services.
Either the BEGINLIBPATH or ENDLIBPATH environment
variable must include the bin subdirectory of the ibmhpj
directory. This enables the HPCJ run-time system to
locate the required DLL, which contains the code that
implements the core Java run-time services. Specifically,
the BEGINLIBPATH and ENDLIBPATH environment variables are
used to append directories to the beginning or the end of
the LIBPATH setting in the CONFIG.SYS file.
There are no mandatory environment variables. The
appropriate environment settings are automatically
determined and set by the hpjava
command.


Java Executables and DLLs

Changing Environment Settings
Running Executables and DLLs

hpjava Command