SQL/MX Programming Manual for Java
Processing SQLJ Programs
HP NonStop SQL/MX Programming Manual for Java—523726-003
5-9
Precedence of Option Settings
directory contains -status=false and -dir=/myjava, then the order of options
would be:
java sqlj.tools.Sqlj -status=true -status=false -dir=/myjava
-dir=/mydir MyProg.sqlj
In the previous example, the second -dir option takes precedence over the first -dir
option. For more information, see Precedence of Option Settings on page 5-9.
Precedence of Option Settings
The SQLJ translator program reads the option settings in the following order from
lowest to highest precedence and overrides previous settings for a given option at
each step:
1. Sets options to default settings where applicable
2. Looks for an sqlj.properties file in the Java home directory. If found, the
translator sets the options based on this file.
3. Looks for an sqlj.properties file in the user’s home directory. If found, the
translator sets the options based on this file.
4. Looks for an sqlj.properties file in the current directory. If found, the
translator sets the options based on this file.
5. Looks for option settings on the command line and sets the options as specified.
During this process, the SQLJ translator program looks in any file specified by the
-props option and sets the options as specified there.
The SQLJ translator program processes the command-line arguments in the order you
specify them on the command line from left to right, with the rightmost option having
the highest precedence. You can specify an option more than once on the command
line. In this case, the last value overrides any previous values you set on the command
line or in a .properties file.