Differences between classes12.jar, ojdbc14.jar, ojdbc5.jar and ojdbc6.jar
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?
Related videos on Youtube
JSchlather
Updated on September 17, 2022Comments
-
JSchlather over 1 year
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?
-
Aaron Hudon over 11 yearsNote that this is not a version number, so ojdbc14.jar is not older/more compatible than ojdbc6.jar, it just uses lower class file format and not all JDBC features. Oracle recommends to use always the latest instant client version - even when your DB is older version.
-
-
JSchlather almost 15 yearsWe are using THIN mode.
-
slovon almost 15 yearsuse highest available version = more bugs fixed...
-
Aaron Hudon over 10 years@slovon actually there is a certification document from oracle which tells you what drivers can be used with which DB. the 12.1 drivers are certified with 12.1 and 11.2. For older RDBMS you need the 11.1 drivers. (And 12.1 client comes with a ojdbc7.jar as well, but not in the InstantClient)