Oracle SQLJ Release 9.2.0.1.0 Production

Requirements

SQLJ requires an installation of JDK1.1 or JDK1.2 or later from Sun Microsystems. It must be installed and the Java interpreter must be available in your path. In the rest of this page we assume 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 9.2.0.1.0 release of Oracle's JDBC driver. 


Installation

  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). To achieve better compression and to reduce download time, the zipped distribution has been stored without compression and then re-zipped with compression.
    Windows users may want to use tools like WinZip (Version 6.0 and up). On UNIX environments one can use the command:
    gzip -dc sqlj_92010.tgz | tar xvf -
  2. We assume that you have installed the Oracle Database or Oracle iAS with the Oracle installer. Let ORACLE_HOME be the home directory into which your Oracle products have been installed.
  3. SQLJ is typically installed into ORACLE_HOME/sqlj.

    You can either move the content of ORACLE_HOME/sqlj/bin into ORACLE_HOME/bin, or you can add ORACLE_HOME/sqlj/bin to your PATH.

  4. Configure your environment as follows:
    Verify your JDBC installation before using SQLJ. Refer to the section "Getting Started" in the book  SQLJ Developer's Guide and Reference Oracle 9i Release 2 (9.2.0) for information on testing your SQLJ and JDBC installations. (Note: You must be signed up for the Oracle Technology Network at http://technet.oracle.com in order to access the online documentation.)

  5. Specifically, in order to use SQLJ you must have ORACLE_HOME/jdbc/lib/classesxxx.jar in your CLASSPATH environment variable (where xxx is either 111 or 12, depending on the version of your Java compiler). Additionally -depending on the nature of your JDBC driver- dynamic link libraries may have to be installed.

  6. Ensure that the directory ORACLE_HOME/bin (or ORACLE_HOME/sqlj/bin) with the sqlj and jpub wrapper programs (sqlj.exe and jpub.exe on Windows) is included in your environment variable PATH.
  7. You must add the files ORACLE_HOME/sqlj/lib/translator.jar and one of the ORACLE_HOME/sqlj/lib/runtimexxx.jar libraries. to the environment variable CLASSPATH.

  8. If you use JDK 1.1.x and Oracle JDBC 9.0.1 or later, use runtime11.jar. If you use JDK 1.2 or later and Oracle JDBC 9.0.1 or later use runtime12.jar. You can also use runtime12ee.jar if you have a J2EE environment.
    If you use an Oracle JDBC driver version prior to JDBC 9.0.1 use runtime.jar.
    If you do not have an Oracle JDBC driver in your environment use runtime-nonoracle.jar.

    IMPORTANT!

    • If you are using runtime.jar, you need to explicitly specify -codegen=iso. This runtime version is not compatible with the default code generation option -codegen=oracle for the Oracle 9.0.1 or later JDBC driver.
    • Earlier SQLJ releases only required that you place translator.jar in the CLASSPATH in order to translate and/or run SQLJ programs. SQLJ versions 8.1.7 and later require additionally one of the runtime jar files (runtime.jar, runtime11.jar, or runtime12.jar) in your CLASSPATH in order to translate SQLJ programs.
This completes the installation. 

OTN Download-Specific Release Notes

This OTN Distribution deviates from the SQLJ 9.2.0.1.0 distribution that is supplied with the Oracle 9iR2 database release as follows:
  1. In order to reduce size, this distribution only provides .jar files and no corresponding .zip files.

    If, for example, you require translator.zip instead of translator.jar then you can un-jar translator.zip and re-zip the resulting directory hierarchy.

  2. This distribution does not use Oracle Universal Installer for its installation. As a consequence:
    • we provide Unix as well as Windows wrapper scripts or wrapper executables for SQLJ (sqlj) and JPublisher (jpub) in the same download.
    • wrapper scripts need to be manually placed into [Oracle Home]/bin (or into another location on your PATH)
    • the JPublisher wrapper script for Unix will not be automatically instantiated with information about the installed JDK. If you like to, you can enter this information into the jpub92 wrapper script (found in the sqlj/bin subdirectory) and use it instead of the jpub wrapper script.

Testing

To verify that your installation is correct, follow the instructions in the "Getting Started" section of the SQLJ Developer's Guide and Reference.

The following table provides information about the Oracle JDBC drivers.
 
 

JDBC Driver  JDBC Driver Class Name JDBC URL
Oracle JDBC-OCI  oracle.jdbc.driver.OracleDriver jdbc:oracle:oci:@oracle_sid
Oracle JDBC-Thin  oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@host:port:oracle_sid
Oracle server-side JDBC  oracle.jdbc.driver.OracleDriver jdbc:oracle:kprb:

In the table, host corresponds to the machine name of the database server, for example, localhost. The port corresponds to the tcp/ip port # of the listener, for example 1521. The oracle_sid corresponds to the TNS_alias defined in your local tnsnames.ora file.

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


Documentation

Once you have downloaded and expanded the SQLJ distribution, point your browser to the file sqlj/index.html. This file is indetical to this installation note, except that it also cross-references documentation and sample files that are part of the download.

JPublisher

  • Installation: follow the SQLJ installation steps.If you have installed SQLJ, you also have installed JPublisher. Specifically, you must have an Oracle JDBC driver (classesxxx.jar), translator.jar and an appropriate runtime jar in your CLASSPATH. If you installed SQLJ through the Oracle installer, a shell script, or a .bat file -depending on your platform- for jpub will have been created and placed in [Oracle Home]/bin. It contains all required references to JRE, JDBC, and SQLJ classes. However, in order to properly compile generated .sqlj code, you still want to ensure that your environment is correctly set up for SQLJ. Note also that while JPublisher only requires a Java Runtime Environment, the SQLJ translator must have a full JDK environment.

  • IMPORTANT!
    While in previous releases, JPublisher only required translator.jar in the CLASSPATH, you now also have to supply a  runtime jar (if you use JDK 1.1 and Oracle JDBC 9.0.1 or later you can specify runtime11.jar and under JDK 1.2 or later and JDBC 9.0.1 or later you can specify runtime12.jar).

  • Documentation:  JPublisher User's Guide and Reference

Join the Oracle Technology Network for additional SQLJ and JDBC information, examples, and downloads.
Visit Oracle's Java Homepage for information and updates on JDBC, SQLJ and other Java technologies
This product is serviced through Oracle Support. For more information see http://www.oracle.com/support/.
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy