![]() How to reproduce the "No suitable driver found for 'jdbc:mysql://localhost:3306/" Error in Java? ![]() You can further see these free JDBC courses to learn more about JDBC 4.0 features. So, make sure you have both JDK 6 and a JDBC 4.0 compliant driver to leverage the auto-loading feature of JDBC 4.0 specification. Recently I have seen a common pattern of this error where a Java developer running his program on a version higher than Java SE 6 expects that JDBC driver's JAR will be automatically loaded by JVM because of autoloading of JDBC driver feature of JDBC 4.0 released in JDK 6 but misses the trick that the JDBC driver should also be JDBC 4.0 compliant like mysql-connector-java-5.1.18-bin.jar will be automatically loaded but older version may not, even if you run on Java 6. ![]() Make sure this JAR is available in classpath before running your Java program, otherwise Class.forName() will not be able to find and load the class and throw :, another dreaded JDBC error, which we have seen in the earlier post. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |