eclipse连接 oracle失败
我是这样写的测试连接packagecomm.testUserInfo.s2.accp;importjava.sql.*;publicclassconn{publicsta...
我是这样写的测试连接
package comm.testUserInfo.s2.accp;
import java.sql.*;
public class conn {
public static void main(String[] args) {
String Oracle_URL="jdbc:oracle:thin:@localhost:1521:orcl";
String Oracle_DRIVER="oralce.jdbc.driver.OracleDriver";
String UserName="accp";
String UserPwd="123456";
try{
try {
Class.forName(Oracle_DRIVER);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Connection conn=DriverManager.getConnection(Oracle_URL, UserName, UserPwd);
Statement stmt=conn.createStatement();
//stmt.executeQuery("select * from boy");
System.out.println("DNAL");
}catch(SQLException e){
System.out.println("失败");
}
}
}
但是错误提示是这样的为什么啊
java.lang.ClassNotFoundException: oralce.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at comm.testUserInfo.s2.accp.conn.main(conn.java:14)
失败
为什么会这样子啊~ 我的JAR也加好了
最好哪个大神帮我QQ弄一下~帮帮我叭急急···· 展开
package comm.testUserInfo.s2.accp;
import java.sql.*;
public class conn {
public static void main(String[] args) {
String Oracle_URL="jdbc:oracle:thin:@localhost:1521:orcl";
String Oracle_DRIVER="oralce.jdbc.driver.OracleDriver";
String UserName="accp";
String UserPwd="123456";
try{
try {
Class.forName(Oracle_DRIVER);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Connection conn=DriverManager.getConnection(Oracle_URL, UserName, UserPwd);
Statement stmt=conn.createStatement();
//stmt.executeQuery("select * from boy");
System.out.println("DNAL");
}catch(SQLException e){
System.out.println("失败");
}
}
}
但是错误提示是这样的为什么啊
java.lang.ClassNotFoundException: oralce.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at comm.testUserInfo.s2.accp.conn.main(conn.java:14)
失败
为什么会这样子啊~ 我的JAR也加好了
最好哪个大神帮我QQ弄一下~帮帮我叭急急···· 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询