public class Test{
public static final String DBDRIVER = "org.gjt.mm.mysql.Driver";
public static void main(String args[]){
try{
Class.forName(DBDRIVER);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}
}
运行提示: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
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 Test.main(Test.java:13)
这是怎么回事?哪里不对了?