Removal of JDBC ODBC bridge in java 8

前端 未结 5 793
Happy的楠姐
Happy的楠姐 2020-11-22 15:42

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

Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\"); // classNotFoundExceptio         


        
5条回答
  •  Happy的楠姐
    2020-11-22 16:01

    Well, in my opinion this blog entry by an Oracle employee says it all:

    I would recommend that you use a JDBC driver provided by the vendor of your database or a commercial JDBC Driver instead of the JDBC-ODBC Bridge.

    What kind of application are you using the JDBC-ODBC Bridge for?

    • If it is production code, you should IMHO replace the bridge with a real driver and the legacy database with a real one ASAP
    • If it is test code that interacts with an Access DB, Excel spreadsheet or whatever you can access through ODBC, try replacing it with a pure Java database like H2
    • If you use it for ad-hoc access to legacy Access DBs for, say, development and/or analytical purposes, and really can't or don't want to update anything, you can stick to a JDK 7 for quite a long while until its End-of-Life date and probably far beyond that

提交回复
热议问题