JDBC Thin Oracle 11g JDBC Thin Oracle 11g oracle oracle

JDBC Thin Oracle 11g


In order to use the Oracle JDBC driver, you must have the ojdbc6.jar or an equivalent on the CLASSPATH. There is no requirement for any of these JARs to be in the operating system PATH variable.

You can obtain the JDBC drivers for Oracle from the JDBC/UCP page on the Oracle Technology Network.

Additionally, the classes12.jar file is not required, if you already have ojdbcX.jar in the CLASSPATH.

Briefly stated, if you are using the Oracle Thin Driver for JDBC against a 11g database, you'll need ojdbc5.jar/ojdbc6.jar and orai18.jar in the CLASSPATH. You'll need additional files for the OCI driver.


I'm not sure what you meant here

Class_Path: %ORACLE_HOME%\jlib\orai18n.jar;%ORACLE_HOME%\oui\jlib\classes12.jar Path: %Oracle_home%\jdbc\ojdbc6.jar

All the jars should be on the Class_path.

You will need the directories with dlls on your PATH.


I wonder if your problem is a mix of JDBC driver JARs. I don't know where you got yours, but you should not have both classes12.jar and ojdbc6.jar. The first one is an older version for JDK 1.2; you should remove it. If you're compiling against JDK 6, use ojdbc6.jar.

I'd also advise that you use the java.sql interfaces and not Oracle specific classes for your static types to keep your code generic. This is only a sample, but you'll want to keep that in mind for your real applications.