User guide
Once the Oracle JDBC for Rdb kit is installed on you OpenVMS server machine you
must copy the thin driver component to the machine on which you will be running your
application. This machine will also need to have JAVA installed.
*/
The client-side components of the thin driver are contained in the RDBTHIN.JAR file.
A file transfer program such as FTP may be used to copy this JAR file to your client
machine. Remember to ensure that a binary mode transfer is done as JARs are binary
files.
You should place the JAR in an appropriate directory on your client machine. This may
depend on how you will ultimately use the JDBC drivers and on the application and
development systems you will be using on your client machine. See your application or
development environment documentation on where JDBC drivers should be placed.
You should ensure that the RDBTHIN.JAR is part of your CLASSPATH so that JAVA
will be able to load it when your application requests it.
Depending on the client system there will be methods by which you can include the
driver JAR as part of the JAVA command when running your application, in which case
the JAR does not have to placed in the CLASSPATH environmental variable.
Example
For example, in MSDOS. JAVA allows the use of –cp switch to specify classpath
elements
dos> java –cp .;rdbThin.jar my_app
Note:
JAR files are binary files so you should ensure that the transfer utility copies the JAR file
in binary mode.
Step 6 Write your application using the JDBC API
The following is a simple application that tests that you have installed JDBC and carried
out any set up correctly. This example is based on RdbJdbcCheckup.java from the
installation and assumes that the Rdb server node has an IP of 555.1.14.91 and that the
thin server we will use, the one we started earlier, is listening on port 1888.
Example
/*
* This sample can be used to check the JDBC installation.
* Just run it and provide the connect information. It will select
* "Hello World" from the database.
150