SQL/MX Programming Manual for Java
Getting Started
HP NonStop SQL/MX Programming Manual for Java—523726-003
2-4
Configuring the Java Environment
The command displays output similar to:
The JDBCMX information indicates the product version of the JDBC/MX driver that is
installed on the system in the specified location.
Compare the output of the command with the product version in the README or
SOFTDOC file of the JDBC/MX driver. If you have an incompatible product version of
JDBC/MX, obtain the correct version of the product and follow the installation
instructions in the README file on the NonStop Server for Java product CD.
For version compatibility, see Table 2-1 on page 2-1.
Configuring the Java Environment
To process and execute SQLJ programs, configure your system by:
•
Setting the JREHOME Environment Variable on page 2-4
•
Setting the Class Path on page 2-4
•
Establishing Java Security on page 2-6
Setting the JREHOME Environment Variable
If you install the NonStop Server for Java in a nonstandard location, you must set the
JREHOME environment variable to the current installation directory of the NonStop
Server for Java.
To set the JREHOME environment variable, enter this command at an OSS prompt:
The java-installation-directory is the path of the installation directory of the
NonStop Server for Java.
SQL/MX uses Java components in the directory specified by the JREHOME
environment variable during the execution of SQLJ programs. The setting of the
JREHOME environment variable persists for the current session.
Setting the Class Path
The class path contains an ordered list of directories and JAR files in which to search
for Java class files. To set the class path, use these approaches:
•
Setting the CLASSPATH Environment Variable on page 2-5
•
Specifying the java -cp Option on page 2-5
HP JDBC driver for NonStop(TM) SQL/MX Version
T1225V31_08APR2004_JDBCMX_20040326
export JREHOME=java-installation-directory/jre
Note. The SQLJ product file, sqlj.jar, and the JDBC/MX driver, jdbcMx.jar, must be in
the class path for you to be able to process and execute SQLJ programs.