java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at util.DBHelper.<clinit>(DBHelper.java:21)
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/shopping?useUnicode=true&characterEncoding=UTF-8
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at util.DBHelper.getConnection(DBHelper.java:34)
at util.DBHelper.main(DBHelper.java:44)
亲亲,建议你给mysql和JDBC看了再来学这个,navicat不叫数据库,只是一个可视化的工具,他们的关系相当于主机和屏幕的关系
这里登上了