SQLJ
Reference Implementation 1.0.1.1
Nov 03, 1998



Requirements

SQLJ requires an installation of JDK1.1 from JavaSoft. It must be installed and the Java interpreter must be available in your path. In the rest of this page we assumed that both the Java compiler (javac) and the Java interpreter (java) are installed correctly in your path.

Since SQLJ runs on top of the JDBC API, a driver compliant with the database to be used must be installed in your system. The current version of SQLJ has been tested with the production release of Oracle's JDBC driver and the JDBC-ODBC Bridge available for free download from JavaSoft. Go to these sites to find out how to install these products.


Installation

To install proceed as follows:

  1. Either unzip or uncompress and untar the distribution. This will create a directory tree, with the single directory sqlj at the root (e.g., $HOME/sqlj or c:\sqlj ).  The two distributions  of SQLJ only differ in their compression format and in the line termination character(s) used for text-only files. Also, to achieve better compression and to reduce download time, the zipped distribution has been stored without compression and then zipped.

  2. Windows users may want use tools like winzip (Version 6.0 and up). On UNIX environments one can use the command:

    gzip -dc sqlj_1011.tgz | tar xvf -
  3. Add the directory .../sqlj/bin to the environment variable PATH.
  4. Add the file .../sqlj/lib/translator.zip to the environment variable CLASSPATH.

This completes the installation.



Testing

To test if your installation is correct, follow the instructions in the "Getting Started" section of the SQLJ User's Guide and Reference.

As mentioned before, you must have installed a JDBC driver in your environment. The connection URL depends on the particular vendor that provided your JDBC driver. Consult the vendor documentation for the fully qualified name for the JDBC driver class, and for the syntax of the url used to connect to a database using that driver.

The following table indicates the value of these parameters for different vendors.
 

JDBC Driver  JDBC Driver Class Name JDBC URL
Generic Vendor vendor.jdbc.Driver jdbc:vendor:oracle_sid
Oracle JDBC-OCI7  oracle.jdbc.driver.OracleDriver jdbc:oracle:oci7:@oracle_sid
Oracle JDBC-OCI8  oracle.jdbc.driver.OracleDriver jdbc:oracle:oci8:@oracle_sid
Oracle JDBC-Thin  oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@host:1521:oracle_sid
Weblogic weblogic.jdbc.oci.Driver jdbc:weblogic:oracle:oracle_sid

In the table, oracle_sid, corresponds to the TNS_alias defined in your local tnsnames.ora file. Most drivers allow other ways to specify a remote database in the URL that do not require the existence of aliases in your environment. Consult the documentation of your JDBC driver for the specific syntax.

Since SQLJ relies on JDBC for acquiring the connections to be used, in your application you can use any of the JDBC mechanisms recommended by your vendor for loading the JDBC driver and specifying the database URL.


Documentation


Visit the SQLJ site for additional information and updates on SQLJ.
Visit Oracle's SQLJ Homepage for information on Oracle's SQLJ translator.
To report any problems or comments, email Oracle's SQLJ Feedback .