在java 8中删除JDBC ODBC桥 [英] Removal of JDBC ODBC bridge in java 8

查看:266
本文介绍了在java 8中删除JDBC ODBC桥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从Java 8开始,JDK将不再包含JDBC-ODBC Bridge。

Starting with Java 8, the JDBC-ODBC Bridge will no longer be included with the JDK.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // classNotFoundException is thrown

是否还有其他连接JDBC-ODBC Bridge的解决方案?

Is there any other solution connecting JDBC-ODBC Bridge?

推荐答案

我们仍然可以在java 8中使用JDBC-ODBC Bridge,只需按照这个简单的方法:

We can still use JDBC-ODBC Bridge in java 8 too, just follow this simple recipe:


  1. 下载JDK 7或JRE 7.

  2. 转到JRE \ ltl文件夹并找到rt.jar

  3. 解压缩(如果您安装了WinRAR或7zip)或者您可以将其重命名为rt.zip并解压缩。

  4. 复制sun\jdbc和sun \ security\action文件夹输出,保留文件夹结构。即,你应该有如下文件夹结构:

  1. Download a JDK 7 or JRE 7.
  2. Goto JRE\lib folder and find the rt.jar
  3. Unzip it (if you have WinRAR or 7zip installed) or you can rename it to rt.zip and unzip it.
  4. Copy sun\jdbc and sun\security\action folders out, keep the folder structure. i.e., you should have the folder structure like below:

Sun --> Security --> Action
    --> JDBC


  • 打开CMD窗口。转到Sun文件夹的父文件夹。运行命令: jar -cvf jdbc.jar sun

    如何启用JDK 8的JDBC-ODBC桥接

    这篇关于在java 8中删除JDBC ODBC桥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆