tutorial to learn more about the JDBC Drivers. I am getting the following errors:
Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Class.forName0(Native Method)
means that the driver class can't be found. And that would be because you didn't put the jar containing the driver file into your classpath.
But you're not alone. Probably 10 percent of the questions in this forum are this question. So if the hint about the classpath isn't enough, I'm sure that somebody has explained how to set your classpath in detail, or at least posted a link to the tutorial, in one or more of those threads.
Joined: Jun 24, 2008
Yeah, I read about that in the search for similar issues. My classpath is as follows:
Your classpath is supposed to consist of directories (where Java will look for classes) and jar files (where Java will look for classes). Specify the jar file in your classpath if you want Java to use it (and you do).