Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

Where to put mysql jdbc driver on Solaris 10 to solve java.lang.ClassNotFoundException: com.mysql.jdbc.Driver (1 reply)

$
0
0
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.

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>