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

83,864

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?

Share:
83,864

Related videos on Youtube

JSchlather
Author by

JSchlather

Updated on September 17, 2022

Comments

  • JSchlather
    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
      Aaron Hudon over 11 years
      Note 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
    JSchlather almost 15 years
    We are using THIN mode.
  • slovon
    slovon almost 15 years
    use highest available version = more bugs fixed...
  • Aaron Hudon
    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)