SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)

Setting JREHOME in the OSS Environment
To set the JREHOME environment variable in the OSS environment, enter this command at an OSS
prompt:
export JREHOME=java-installation-directory/jre
The java-installation-directory is the path of the installation directory of the NonStop
Server for Java.
For example, this command sets the JREHOME location for SPJs invoked in the current OSS session:
export JREHOME=/usr/myjavadir/jre
For more information about the export command, see the Open System Services Shell and Utilities
Reference Manual.
Setting JREHOME in the Guardian Environment
To set the JREHOME environment variable in the Guardian environment, enter this PARAM command
at a Guardian prompt:
PARAM JREHOME java-installation-directory/jre
The java-installation-directory is the path of the installation directory of the NonStop
Server for Java.
For example, this command sets the JREHOME location for SPJs invoked from embedded SQL
programs in C, C++, or COBOL that will run in the current Guardian session:
PARAM JREHOME /usr/myjavadir/jre
For more information about the PARAM command, see the TACL Reference Manual.
Setting the JDBC/MX Location
By default, NonStop SQL/MX loads the jdbcMx.jar file of JDBC/MX from the standard location
of /usr/tandem/jdbcMx/current/lib into the SPJ environment. In some cases, you might
want to use another version of JDBC/MX that is compatible with NonStop SQL/MX but that is not
installed in the standard location. To use jdbcMx.jar in a nonstandard location, you must set
the UDR extensions class path to the JAR file path of jdbcMx.jar.
When an SQL/MX application starts with a UDR extensions class path setting for the JDBC/MX
location, NonStop SQL/MX loads jdbcMx.jar from the specified location into an SPJ environment
created for the application.
UDR Extensions Class Path
Before setting the JDBC/MX location, consider that:
The UDR extensions include jdbcMx.jar and are not the same as the JVM extensions, which
are typically located in $JREHOME/lib/ext.
The SQL/MX UDR server has its own search path for UDR extensions, called the UDR extensions
class path, and this class path contains a standard location for jdbcMx.jar.
The UDR extensions class path is not the same as the class path. Do not use the class path to
specify the location of a JDBC/MX driver in the SPJ environment. For more information about
the class path, see Setting the Class Path (page 43).
The -Dsqlmx.udr.extensions option adds a class path to the beginning of the search
path of the SQL/MX UDR server. The -Dsqlmx.udr.extensions setting takes precedence
over but does not override the search path.
42 Getting Started