Hi,
I've been trying for ages to connect to my Oracle 9.2.0 database from Java.
I am attempting to create a thin connection.
The necessary drivers were installed with the database and I have all the relevant files under the folder C:\oracle\ora92 \jdbc\lib
Initially I had JDK 6 downloaded from Sun's website, but I didn't think it would be compatible with the older database, so I then replaced that with SDK 1.4.
I created the environment variable CLASSPATH and having searched for help all over the Internet I have tried each of the following values:
C:\oracle\ora92 \jdbc\lib\
C:\oracle\ora92 \jdbc\lib\class es12.zip
C:\oracle\ora92 \jdbc\lib\class es111.zip
C:\oracle\ora92 \jdbc\lib\ojdbc 14.jar
When I attempt to run the following....
Class.forName(" oracle.jdbc.dri ver.OracleDrive r");
or...
DriverManager.r egisterDriver(n ew oracle.jdbc.dri ver.OracleDrive r());
... I get a ClassNotFoundEx ception.
I have "import java.sql.*;" at the top of my class.
One website I found said that I should also import oracle.jdbc.*; but that wont compile for the same, not found, reason.
Can anyone help me? It is probably something really obvious and silly that I am not doing, but isn't it always?!
Thanks,
Owen
I've been trying for ages to connect to my Oracle 9.2.0 database from Java.
I am attempting to create a thin connection.
The necessary drivers were installed with the database and I have all the relevant files under the folder C:\oracle\ora92 \jdbc\lib
Initially I had JDK 6 downloaded from Sun's website, but I didn't think it would be compatible with the older database, so I then replaced that with SDK 1.4.
I created the environment variable CLASSPATH and having searched for help all over the Internet I have tried each of the following values:
C:\oracle\ora92 \jdbc\lib\
C:\oracle\ora92 \jdbc\lib\class es12.zip
C:\oracle\ora92 \jdbc\lib\class es111.zip
C:\oracle\ora92 \jdbc\lib\ojdbc 14.jar
When I attempt to run the following....
Class.forName(" oracle.jdbc.dri ver.OracleDrive r");
or...
DriverManager.r egisterDriver(n ew oracle.jdbc.dri ver.OracleDrive r());
... I get a ClassNotFoundEx ception.
I have "import java.sql.*;" at the top of my class.
One website I found said that I should also import oracle.jdbc.*; but that wont compile for the same, not found, reason.
Can anyone help me? It is probably something really obvious and silly that I am not doing, but isn't it always?!
Thanks,
Owen
Comment