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

Advanced Options

The following table lists the advanced options available for use with the java ifxsqlj command. Many of these options are for online checking, which is discussed in Online Checking.

Option
Description
-cache
Turns on the caching of results from online checking

Caching saves you from unnecessary connections to the database in subsequent runs of the translator for the same file.

Results are written to the file SQLChecker.cache in your current directory. The cache holds serialized representations of all SQL statements that translated without errors or warnings. The cache is cumulative and grows through successive invocations of the translator.

You empty the cache by deleting the SQLChecker.cache file.

Caching is off by default; you turn caching on by setting the -cache option to true, 1, or on; for example, -cache=true. You turn caching off by setting the option to false, 0, or off.

-compile
Set this flag to false to disable processing of .java files by the compiler. This applies to generated .java files and to .java files specified on the command line.
-compiler-executable
Specifies a particular Java compiler for the java ifxsqlj command to use

If unset, the translator uses javac. If you do not specify a directory path, the java ifxsqlj command searches for the executable according to the setting of your PATH environment variable.

-compiler-encoding-flag
Set this flag to false to prevent the value of the SQLJ -encoding option from being automatically passed to the compiler.
-compiler-output-file
If you have instructed the Java compiler to output its results to a file, use the -compiler-output-file option to specify the filename.
-driver
Specifies a list of JDBC drivers that can be used to interpret JDBC connection URLs for online checking (see Online Checking)

You specify a class name or a comma-separated list of class names. For example, specify IBM Informix JDBC Driver as follows:

-driver=com.informix.jdbc.IfxDriver

-offline
Specifies a Java class to implement off-line checking

The default off-line checker class is sqlj.semantics.OfflineChecker.

Off-line checking only runs when online checking does not (either because online checking was not enabled or because it stopped because of error). Off-line checking verifies SQL syntax and the usage of Java types.

With off-line checking, there is no connection to the database.

-online
Specifies a Java class or list of classes to implement online checking

The default online checker class is sqlj.semantics.JdbcChecker.

You can specify an online checker class for a particular connection context, as in:

-online@ctxclass2=sqlj.semantics.JdbcChecker

You must specify a user name with the -user option for online checking to occur. The -password, -url, and -driver options must be appropriately set as well.

-password
Specifies a password for the user name set with the -user option

If you specify the -user option, but not the -password option, the translator prompts you for the password.

If you are using multiple connection contexts, the setting for -password for the default connection context also applies to any connection context that does not have a specific setting.

-ser2class
Set this flag to true to convert the generated .ser files to .class files. This is necessary if you are creating an applet to be run from a browser, such as Netscape 4.0, that does not support loading a serialized object from a resource file.

The original .ser file is not saved.

-url
Specifies a JDBC URL for establishing a database connection for online checking (see Database URLs and Online Checking)

The URL can include a host name, a port number, and an Informix database name. The format is:

jdbc:informix-sqli://{<ip-address>|
<domain-name>}:<port-number>[/<dbname>]:
INFORMIXSERVER=<server-name>[;user=<username>;
password=<password>;<name>=<value>
[;<name>=<value>]...]

If you are using multiple connection contexts, the setting for -url for the default context also applies to any connection context that does not have a specific setting.

You can specify a URL for a particular connection context, as in
-url@ctxclass2=....

Any connection context with a URL must also have a user name set for it (using the -user option) for online checking to occur.

-user
Enables online checking and specifies the user name with which the translator connects to the database (see Online Checking)

For example, to enable online checking on the default connection context and connect with the user name fred, use the following option:

-user=fred

If you are using multiple connection contexts, the setting for -user for the default connection context also applies to any connection context that does not have a specific setting.

If you want to enable online checking for the default context, but turn off online checking for another connection—for example ctxcon2—you need to specify the -user option twice:

-user=fred -user@ctxcon2=

To enable online checking for a particular connection context, specify that context with the user name, as in:

-user@ctxcon3=joyce

The classes of the connection contexts you specify must all be declared in your source code or previously compiled into a .class file.

-vm
Specifies a particular Java interpreter for the java ifxsqlj command to use

You must also include the path to the interpreter. If you do not specify a particular Java interpreter using this option, the translator uses java as a default.

The -vm option must be specified on the command line; you cannot set it in a property file.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]