Hi
I am trying to write a standalone
java class (with main function) to understand the working of
JDBC. I have downloaded the MySQL installer for Windows from the mysql site and installed it. Now I am trying to run the following code to see if a successful connection is being made.
It compiles fine, but at runtime, throws an exception
java.lang.ClassNotFoundException : com.mysql.jdbc.Driver
Can anyone please point out what I need to do? My guess is, either my class name in incorrect, or I need to put the mysql jar in a particular folder. Which one is it? Also, this code above is not written by me. I got it from a tutorial site. Hence, is it possible that the values of
are incorrect for my particular case?