SQL/MX Programming Manual for Java
Program and Module Management
HP NonStop SQL/MX Programming Manual for Java—523726-003
6-7
Customizing Profiles in a JAR File
Customizing Profiles in a JAR File
You can customize profiles (.ser files) in a JAR file—including those from another
vendor—and optimize the profiles for the NonStop SQL/MX environment. The SQLJ
customizer in SQL/MX adds SQL/MX customization to the profile and does not affect
the customization of another vendor if it exists. For more information, see
Customization Without Module Definition Files on page 1-13.
Requirements for Customizing JAR Files
For the SQLJ translator program to customize profiles in a JAR file, the profiles must
be listed in the manifest file of the JAR file. You can control which profiles are
customized by including (or excluding) the names of profiles in the manifest file. See
Listing Profiles in a Manifest File on page 6-6.
For customization to succeed, you must also specify the location of the JAR file in the
class path. For more information, see Setting the Class Path on page 2-4.
Commands for Customizing JAR Files
To customize the profiles in JAR files, use one of these approaches:
•
Default customization without module definition files
•
Customization with module definition files
To customize without module definition files, issue this OSS command:
java sqlj.tools.Sqlj MyApp.jar
Remember to SQL compile the extended profiles in the JAR file by using the
mxCompileUserModule utility. For more information, see mxCompileUserModule
Command Line on page 5-34.
To customize with module definition files, issue one of these OSS commands:
java sqlj.tools.Sqlj -P-CcreateMDF MyApp.jar
java sqlj.tools.Sqlj -P-CSQLMXCustomizerVersion=800 MyApp.jar
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.