java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver at java.net.URLClassLoader$1.run(URLClas

报错:

java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:195)
	at com.bjsxt.emp.Test.main(Test.java:44)
Exception in thread "main" java.lang.NullPointerException
	at com.bjsxt.emp.Test.main(Test.java:78)

原因:没有加载jar包

解决办法:在src下边创建lib,然后倒入jar包就可以。

你可能感兴趣的:(jdbc)