How Do You Troubleshoot the Error “java.lang.classnotfoundexception oracle.jdbc.driver.oracledriver”?

Problem scenario
You run a Java program and receive "java.lang.classnotfoundexception oracle.jdbc.driver.oracledriver".  You need to get a program working despite reading that this driver has been deprecated.  What should you do?

Solution
1.  Find the JRE/lib/ext directory.  
2.  Place an ojdbc14.jar file (e.g., downloaded from Oracle.com or some trustworthy website) in that directory.
3.  Without recompiling your program, run the Java program again.

For future reference:
If you want to reinstall Java or install the JDK on any type of Linux see this posting.  For more information about database connectivity from a Java program, see this website.

Leave a comment

Your email address will not be published. Required fields are marked *