I use Netbeans for my java project. Everything works fine when I run it locally in Netbeans, but when I run the applet in a browser, I get the following error:

java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/MyProject

In Netbeans, I have mysql-connector-java-5.1.13-bin.jar file included in my classpath and use Class.forName("java.sql.Driver"); in my code.