SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-41
SQLJ Run-Time Command Line
SQLJ Run-Time Command Line
After processing an SQLJ program, you can execute it as stand-alone program by
issuing the java command on the command line. For other ways of executing a
program, see Execution Scenarios on page 1-22.
Command-Line Syntax
To run an SQLJ program, enter this command at an OSS prompt:
java
is the Java application launcher, which executes Java bytecode.
Java-options
are the Java application launching options available to Java applications on the
NonStop system. For information, see the NonStop Server for Java Tools
Reference Pages.
MyProg
is the name of the class file of the translated SQLJ program. Do not specify the
suffix of the file name, .class. If you use the file suffix, the JVM interprets
.class to be a class that is part of a package named MyProg and returns an
error.
Qualifying Database Object Names at Run Time
If you customized an SQLJ program and it has modules (compiled plans), qualification
of object names occurs during customization, and you cannot change it during run
time. However, if you did not customize an SQLJ program, or if you customized an
SQLJ program with the
-missingSQLObject option set to true and some statements
referred to nonexistent database objects during customization, qualification of object
names occurs at run time based on the current default settings. The default settings, in
order of precedence, from highest to lowest, are:
1. The
-Dcatalog and -Dschema Java options on the SQLJ run-time command line
2. CATALOG and SCHEMA attributes in the SYSTEM_DEFAULTS table
3. User group and user name of the current user
To supply a catalog and schema to the JVM at run time, use the -Dcatalog and
-Dschema Java options. If you qualify the object names in this manner, the same
catalog and schema names must exist in the database when you run the SQLJ
program. For more information about these Java options, see the NonStop Server for
Java Tools Reference Pages.
java [Java-options] MyProg