虽然我试图连接到使用java类的mysql数据库,但我得到这个错误。
请帮助我设置了CLASSPATH: C:\mysql-connector-java-5.0.8\mysql-connector-java-5.0.8.jar
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at connect.main(connect.java:17)
Cannot connect to database server
Exception in thread "main" java.lang.NullPointerException
at connect.main(connect.java:29)