INFORMIX
IBM Informix Embedded SQLJ User's Guide
Chapter 5: Processing Embedded SQLJ Source Code
Contents Index

Setting Options

You specify options for the java ifxsqlj command either on the command line or in a property file. Command line options are discussed in "Setting Options on the Command Line". Property files are discussed in "Supplying Options in 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.

Setting Options on the Command Line

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:

    Passes compiler options to the Java compiler, as shown in the following example:

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

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.

Supplying 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").

You cannot use a property file to specify:

Precedence of 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

Tip: The translator ignores empty lines.
The syntax for specifying options is the same as shown in "Command Options", 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:




IBM Informix Embedded SQLJ User's Guide, Version 1.0
Copyright © 1999, IBM Corporation. All rights reserved.