SQL/MX Programming Manual for Java

Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java523726-003
5-3
Commands for Processing Without Module
Definition Files
You can also invoke the Java compiler independently of the SQLJ translator program
by running the javac command. For example, issue this OSS command to initiate
Java compilation:
javac MyProg.java
For more information, see Java Compiler Command Line on page 5-33.
Command for Customization
If you specify a .ser file (profile) or .jar file containing profiles on the SQLJ
command line, sqlj.tools.Sqlj performs customization on each profile. For
example, issue this OSS command to initiate customization:
java sqlj.tools.Sqlj MyProg_SJProfile0.ser MyApp.jar
For more information, see Customization Without Module Definition Files on page 1-13
and Options for the SQLJ Customizer on page 5-26.
If you pass a JAR file to the SQLJ translator program, the profiles in the JAR file must
be listed in the manifest file, and the JAR file must be in the class path. For more
information, see Customizing Profiles in a JAR File on page 6-7.
Command for SQL Compilation by mxCompileUserModule
To invoke SQL compilation, you must run the mxCompileUserModule utility after you
run the SQLJ translator program, sqlj.tools.Sqlj. Pass an extended profile (.ser
file) or a JAR file containing extended profiles to mxCompileUserModule. For
example, issue these OSS commands to initiate SQL compilation:
mxCompileUserModule MyProg_SJProfile0.ser
mxCompileUserModule
MyApp.jar
For more information, see Compilation by mxCompileUserModule on page 1-14 and
mxCompileUserModule Command Line on page 5-34.
Caution. If you do not run mxCompileUserModule, you will not generate module files, and
the program will either run dynamically or return an SQL exception indicating that the module is
missing or corrupted. For more information, see SQL/MX Compiler Errors on page 4-5.