Where to put mysql jdbc driver on Solaris 10 to solve java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Posted by: James Huang
Date: August 20, 2010 04:47PM

I need to setup mysql + java on my latest project. After install mysql community server v5.1.50, instead of using Solaris 10 bundled v4.0.31 (it's another topic), I tried to kick of the java application, unfortunately, got error "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver". I downloaded jdbc connector jar file from sun, put on to application local directory, and set CLASSPATH environment, failed. Then, specified '-classpath' option onto java command line, also failed.

After tons of trails, finally, found the solution to fix the exception.
put jdbc connector jar file on to java ext lib directory, on Solaris 10, where is:
/usr/java/jre/lib/ext

Hopefully, this clue helps you.

Options: ReplyQuote


Subject
Written By
Posted
Where to put mysql jdbc driver on Solaris 10 to solve java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
August 20, 2010 04:47PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.