I'm working on my first JDBC web app and trying to get it to connect to my MySQL database.
The SQL service is running as far as I can tell since it's visible from the the processes tab in Task Manager. I've also added the jar to my build path and its clearly visible under Java Resources>src>Libraries>mysql-connector.jar.
However, I still get this error :
Error loading driver: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
This is the only code left in my doGet method:
try {
Class.forName("com.mysql.jdbc.Driver");
}
catch (ClassNotFoundException cnfe)
{
System.out.println("Error loading driver: " + cnfe);
}