SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-18
Options for Output Files and Directories
Options for Output Files and Directories
Use these options to specify the locations of the output files during SQLJ processing.
-d
The -d option specifies the root output OSS directory for all the profiles (.ser files)
generated by the SQLJ translator, all the module definition files (.m) generated by the
SQLJ customizer, and all the class files (.class) generated by the Java compiler. The
directory must exist at the time of translation.
Use the -d option with SQLJ source files (.sqlj) or Java source files (.java) on the
command line. If you use the -d option with profiles (.ser) or JAR files (.jar) on the
command line, the -d option has no effect on the location of the extended profiles
(.ser) or the module definition files (.m). These generated files are stored in the same
directories as the original .ser and .jar files. Profiles within JAR files are extended
and stored within their respective JAR files regardless of the -d option. In some cases,
this behavior might cause naming conflicts for module definition files. For more
information, see Avoiding Possible Naming Conflicts on page 6-10.
If you specify a relative path, the full path is derived from the current directory. For
example, if you run the command line from a current directory of /usr/dev and
specify -d=mybin, the full path of the profiles, module definition files, and class files is
/usr/dev/mybin.
If an SQLJ source file contains a package statement, the SQLJ translator program
places all generated files in subdirectories based on the package name. For example,
if an SQLJ source file specifies a package named app1 and if another SQLJ source
file specifies a package named app2, you need only specify the root directory,
-d=mybin, or the current directory, -d=., for both source files on the command line.
The profiles, module definition files, and class files of the first source file are stored in
/usr/dev/mybin/app1, and the files of the other source file are stored in
/usr/dev/mybin/app2, where /usr/dev is the current directory. For more
information about the package statement, see Specifying the Java Package of an
SQLJ Program on page 3-4.
You cannot use the -C prefix with the -d option. For more information, see Disallowed
Java Compiler Options on page 5-25.
-dir
The -dir option specifies the root output OSS directory for the Java source files
(.java files) generated by the SQLJ translator. This directory must exist at the time of
translation.
Note. To ensure successful customization, include the full directory path of the -d option in
the class path. For more information, see Setting the Class Path on page 2-4.