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
Is there any other solution connecting JDBC-ODBC Bridge?
The JDBC-ODBC Bridge allows applications written in the Java programming language to use the JDBC API with many existing ODBC drivers. The Bridge is itself a driver based on JDBC technology ("JDBC driver") that is defined in the class sun.
The JDBC type 1 driver, also known as the JDBC-ODBC bridge, is a database driver implementation that employs the ODBC driver to connect to the database. The driver converts JDBC method calls into ODBC function calls.
No. ODBC stands for Open Database Connectivity which literally means that it is compatible with all types of languages such as C, C++, Java, etc. JDBC Stands for Java database connectivity i.e only compatible with java language. ODBC was introduced by Microsoft prior to JDBC in 1992.
No. The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading.
We can still use JDBC-ODBC Bridge in java 8 too, just follow this simple recipe:
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
Open a CMD window. Go to the parent folder of Sun folder. Run the command: jar -cvf jdbc.jar sun
lib
folder. If that doesn't work try the lib\ext
folder.How to enable JDBC-ODBC bridge for JDK 8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With