Options for the ifxsqlj command

You specify options for the java ifxsqlj command either on the command line or in a property file. Command line options are discussed in ifxsqlj command-line options. Property files are discussed in Format of property files.

For Boolean options (those that are either on or off), you can set the option simply by specifying the option name; for example, -linemap. You can also set the option to TRUE, as in -linemap=true. To turn off a Boolean option, you must set it to FALSE: for example, -linemap=false. You can also set Boolean options to yes or no, or to 1 or 0.

ifxsqlj command-line options

Options on the command line override any options set in default files. If the same option appears more than once on the command line, the translator uses the final (rightmost) option's value.

Command-line option names are case sensitive.

You can attach prefixes to options to pass the option to the Java™ compiler or to the Java interpreter. If you do not use a prefix, the option is passed to the SQLJ translator.

The prefixes are:
-C
Passes compiler options to the Java compiler, as shown in the following example:

-C-classpath=/user/jdk/bin

-J
Passes interpreter options to the Java interpreter, as shown in the following example:

-J-Duser.language=ja

The options available to pass to the interpreter depend on the release and brand of Java you are using.

Do not use the -C prefix with the -d and -encoding options; when you specify these SQLJ translator options, they are automatically passed to the Java compiler.

ifxsqlj options in property files

You can use property files to supply options to the java ifxsqlj command. The default name of a property file is sqlj.properties; you can specify a different name by using the -props option on the command line (see Basic options for the ifxsqlj command).

You cannot use a property file to specify:
  • The -props, -help, and -version basic options
  • The -vm advanced option
  • Options with the prefix -J (for passing options to the Java interpreter)

Precedence of ifxsqlj options

The java ifxsqlj command checks for the existence of files called sqlj.properties in the following directories in the following order:

  1. The Java home directory
  2. Your home directory
  3. The current directory

The translator processes each property file it finds and overrides any previously set option if it finds a new setting for that option.

Later entries in the same property file override earlier entries.

Options on the command line override options set by property files.

If you set options on the command line or in a property file specified using the -props option, these options override any options set in sqlj.properties files.

Format of property files

In a property file, you:
  • Specify one option per line.
  • Begin a line with the symbol # to denote a comment.
Tip: The translator ignores empty lines.

The syntax for specifying options is the same as shown in Parameter, field, and variable names, except you replace the initial hyphen with a string followed by a period that indicates to which utility the option is passed.

You can pass options to the SQLJ translator or the Java compiler; however, you cannot pass options to the Java interpreter from a property file. The strings for specifying utilities are as follows.

Precede an option with...
To pass it to this utility...
sqlj.
SQLJ translator
compile.
Java compiler
An example property file looks like this:
# Turn on online checking and specify the user to connect with
sqlj.user=joyce
sqlj.password=*******
# JDBC Driver to connect with
sqlj.driver=com.informix.jdbc.IfxDriver
# Database URL
sqlj.url=jdbc:<ipaddr>:<portno>/demo_isqlj:informixserver=<$INFORMIXSERVER>
# Instruct the compiler to output status messages during compile
compile.verbose