Oracle8i SQLJ Developer's Guide and Reference Release 3 (8.1.7) Part Number A83723-01 |
Library | Service | Contents | Index

## Checking the Installation and Configuration

Once you have verified that the above assumptions and requirements are satisfied, you must check your Oracle SQLJ installation.

### Check for Installed Directories and Files

Verify that the following directories have been installed and are populated.

#### Directories for Oracle JDBC

If you are using one of the Oracle JDBC drivers, refer to the Oracle8i JDBC Developer's Guide and Reference for information about JDBC files that should be installed on your system.

#### Directories for Oracle SQLJ

Installing the Oracle JServer will include, among other things, under your `[Oracle Home]`directory a `sqlj` directory containing the following subdirectories:

- `demo` (demo applications, including some referenced in this chapter)

- `doc`

- `lib` (`.zip` files containing class files for SQLJ)

In addition, directly under `[Oracle Home]` is the following directory, containing utilities for all Java product areas:

- `bin`

Check that all these directories have been created and populated, especially `lib` and `bin`.

### Set the PATH and CLASSPATH

Make sure your `PATH` and `CLASSPATH` environment variables have the necessary settings for Oracle SQLJ (and Oracle JDBC if applicable).

#### PATH and CLASSPATH for Oracle JDBC

If you are using one of the Oracle JDBC drivers, you will need the Oracle JDBC classes ZIP file that is appropriate for your environment.

JDK 1.1.x-compatible classes are in `classes111.zip`; JDK 1.2.x-compatible classes are in `classes12.zip`. Presuming you use a Sun Microsystems JDK environment, make sure the appropriate ZIP file name is in your `CLASSPATH` setting.

For more information about required `PATH` and `CLASSPATH` settings for Oracle JDBC, refer to the Oracle8i JDBC Developer's Guide and Reference.

#### PATH and CLASSPATH for Oracle SQLJ

Set your `PATH` and `CLASSPATH` variables as follows for Oracle SQLJ:

##### PATH Setting

To be able to run the `sqlj` script (which invokes the SQLJ translator) without having to fully specify its path, verify that your `PATH` environment variable has been updated to include the following:

    [Oracle Home]/bin

Use backward slashes for Windows. Replace `[Oracle Home]` with your actual Oracle Home directory.

##### CLASSPATH Setting

Update your `CLASSPATH` environment variable to include the current directory as well as the following:

    [Oracle Home]/sqlj/lib/translator.zip

    Use backward slashes for Windows. Replace [Oracle Home] with your actual
    Oracle Home directory.

In addition, you must include one of the following runtime libraries in your `CLASSPATH`:

    [Oracle Home]/sqlj/lib/runtime.zip
    [Oracle Home]/sqlj/lib/runtime11.zip
    [Oracle Home]/sqlj/lib/runtime12.zip
    [Oracle Home]/sqlj/lib/runtime12ee.zip

If you are unsure about which runtime library you should use, you may want to specify `runtime.zip`. This provides you with the highest flexibility across different Java and JDBC environments. However, if you require SQLJ ISO-compliant support for JDBC 2.0 types, such as `java.sql.Ref`, `Clob`, `Blob`, `Struct`, and `SQLData`, you must use either `runtime12.zip` or `runtime12ee.zip` in conjunction with JDK1.2 or J2EE and the Oracle JDBC 8.1.7 drivers.

Important: You will not be able to run the SQLJ translator if you do not add a runtime library. You must specify a `runtime.zip` file as well as `translator.zip` in your CLASSPATH.

### Verify Installation of sqljutl Package

Note: This step is relevant only to online translation, not offline translation or application runtime, and is applicable only if you are using the following: a pre-8.1.5 Oracle database, or an 8.1.5 and later database that was installed without a server-side JavaVM SQLJ stored procedures or functions

The package `sqljutl` is required for online checking of stored procedures and functions in an Oracle database. For Oracle release 8.1.5 and later, it should have been installed automatically under the `SYS` schema during installation of your database's server-side JavaVM. To verify the installation of `sqljutl`, issue the following SQL command (from `SQL*Plus`, for example):

    describe package sqljutl

This should result in a brief description of the package. If you get a message indicating that the package cannot be found, then you must install it manually. To do so, use `SQL*Plus` to run the `sqljutl.sql` script, which is located as follows:

    [Oracle Home]/sqlj/lib/sqljutl.sql

Consult your installation instructions if necessary.

| Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index