This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC MySql Driver problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC MySql Driver problem" Watch "JDBC MySql Driver problem" New topic

JDBC MySql Driver problem

zack chancery
Ranch Hand

Joined: Aug 19, 2004
Posts: 33
Please help,
I downloaded a mySql Driver that comes in the form of a jar file called mysql-connector-java-3.0.15-ga.jar. i saved it in the jre/lib/ext dir of my j2sdk as is advised but when i try and load it in my program i get an exception. when i print the stackTrace for the exception this is returned:

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at sun.applet.AppletClassLoader.findClass(
at java.lang.ClassLoader.loadClass(
at sun.applet.AppletClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at Teller.<init>(
at Main.init(
Caused by: H:\project\com\mysql\jdbc\Driver.class
(The system cannot find the path specified)
at Method)
at sun.applet.AppletClassLoader.getBytes(
at sun.applet.AppletClassLoader.access$100(
at sun.applet.AppletClassLoader$
at Method)
at sun.applet.AppletClassLoader.findClass(

David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Maybe is problem in applet security.

What mean this part of your stack trace?

Caused by: H:\project\com\mysql\jdbc\Driver.class
(The system cannot find the path specified)

SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
sai Narayan

Joined: Aug 16, 2004
Posts: 21
try setting the classpath as:-
C:\> set CLASSPATH=\path\to\mysql-connector-java-[version]-bin.jar;%CLASSPATH%
It is sorta covered in the JavaRanch Style Guide.
subject: JDBC MySql Driver problem
Similar Threads
running Applets from a Mac
DB connection from swings
Problem in running applets in html
Applet question - .class vs .java
Cant run my applet