用于 Java 6 的 Oracle 瘦驱动程序版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4161214/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 21:55:54  来源:igfitidea点击:

Version of Oracle thin driver to use with Java 6

oraclejdbcoracle10gjdk1.6java-ee-5

提问by Aravind Yarram

We are upgrading from Java 1.5 to Java 6 and J2EE 1.4 to Java EE 5. We are using Oracle 10g. Java EE 5 only supports JDBC 3.0, but Java 6 supports JDBC 4.0. If I am running on a Java EE 5 server with Java 6, can I use the JDBC 4.0 API in my Java EE 5 web app?

我们正在从 Java 1.5 升级到 Java 6,从 J2EE 1.4 升级到 Java EE 5。我们使用的是 Oracle 10g。Java EE 5 仅支持 JDBC 3.0,但 Java 6 支持 JDBC 4.0。如果我在带有 Java 6 的 Java EE 5 服务器上运行,是否可以在我的 Java EE 5 Web 应用程序中使用 JDBC 4.0 API?

Which Oracle thin driver should I use? Is it ojdbc6.jarfrom Oracle's download page? Is that compatible with Oracle 10g?

我应该使用哪个 Oracle 瘦驱动程序?它ojdbc6.jar来自Oracle 的下载页面吗?这与 Oracle 10g 兼容吗?

回答by darioo

You can use ojdbc6.jar.

您可以使用ojdbc6.jar.

There are 3 Oracle JDBC drivers still being widely used:

有 3 个 Oracle JDBC 驱动程序仍在广泛使用:

  • ojdbc14.jarfor projects with JDK 1.4
  • ojdbc5.jarfor projects with JDK 5 (or 1.5)
  • ojdbc6.jarfor projects with JDK 6 (or 1.6)
  • ojdbc14.jar对于 JDK 1.4 的项目
  • ojdbc5.jar对于带有 JDK 5(或 1.5)的项目
  • ojdbc6.jar对于带有 JDK 6(或 1.6)的项目

Even though you're using Java EE 5, if the relevant JDK is 6, then you match Oracle driver's version number with your JDK number.

即使您使用的是 Java EE 5,如果相关的 JDK 是 6,那么您将 Oracle 驱动程序的版本号与您的 JDK 号相匹配。

Oracle has a FAQ on their JDBC drivers regarding driver and database compatibility. Thispart might be useful to you.

Oracle 在其 JDBC 驱动程序上有一个关于驱动程序和数据库兼容性的常见问题解答。部分可能对你有用。

回答by rics

For Oracle 10g hereis the list of available JDBC drivers. The list does not contain a specific driver for JDK 1.6, the latest version is ojdbc14.jar what I suspect you have already used.

对于 Oracle 10g,这里是可用 JDBC 驱动程序的列表。该列表不包含 JDK 1.6 的特定驱动程序,最新版本是 ojdbc14.jar,我怀疑您已经使用过。

Your have referred to Oracle 11g JDBC drivers which may also work with Oracle 10g but I have no experience with that.

您提到了 Oracle 11g JDBC 驱动程序,它也可以与 Oracle 10g 一起使用,但我没有这方面的经验。