I'm getting a message that:"No suitable driver found for jdbc:mysql://localhost/db" When I run the jar file in dist folder.
I'm using Netbeans,what's confusing me is the fact that,when I execute the program from inside Netbeans ,it works perfectly.
try {
Class.forName("java.sql.DriverManager");
//**please note that I also tried "com.mysql.jdbc.Driver",but same result**
}
catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
And my connection string is:"jdbc:mysql://localhost/db"