Java – Differences between classes12.jar, ojdbc14.jar, ojdbc5.jar and ojdbc6.jar

javajdbcjrunoracle

We are planning to upgrade our application servers to a new version of JRun which is carrying with it an upgrade from Java 1.4 to Java 1.6. As part of that, we have been testing various pieces of our software stack and realized the need to look at our Oracle JDBC drivers as well.

Looking at the Oracle site and documentation, the different versions seem to be primarily targeting various versions of the JDBC API, which tend to correspond to the version of the JVM they were introduced in. With Java (generally) being backwards compatible, it seems like sticking with ojdbc14.jar might make the most sense, but I was hoping someone out there could clarify things a bit better.

The docs specifically call out a chart like this, which makes me wonder if ojdbc14.jar is officially supported under Java 6.

classes12.jar - for Java 1.2 and 1.3
ojdbc14.jar - for Java 1.4 and 1.5
ojdbc5.jar - for Java 1.5
ojdbc6.jar - for Java 1.6

Is there something I should be aware of from a systems perspective when mixing and matching drivers and virtual machines?

Best Answer

Yes you can run the smaller drivers on newer java versions. It is just that ojdbc14.jar does not contain JDBC3 and JDBC4 features.

You have to differentiate between runtime and compile time. At runtime you can use ojdbc14.jar in a JRE6 as long as your app code is not using JDBC4 features. If you want to use ojdbc14.jar in the buildpath you might experience probems with not implemented method.

However I generely suggest to use the latest (i.e. 11.1.0.7) JDBC drivers and the highest version possible. (No matter what the DB version is).

Are you using OCI or THIN mode?