Home | Previous Page | Next Page   Processing Embedded SQLJ Source Code > Setting Options >

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:

# 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
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]