当前位置: 技术问答>java相关
Oralce的环境变量设置,谢谢!!
来源: 互联网 发布时间:2015-08-12
本文导语: 我下载了classes12.zip。怎么设置环境变量。程序编译时老是说OracleTest.java:8: package oracle.jdbc.driver does not exist DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); | 在classpath里加入 E:oracleora90jdbclibclas...
我下载了classes12.zip。怎么设置环境变量。程序编译时老是说OracleTest.java:8: package oracle.jdbc.driver does not exist
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
|
在classpath里加入
E:oracleora90jdbclibclasses12.jar;
就是这样
classpath=.;E:oracleora90jdbclibclasses12.jar;
E:oracleora90jdbclibclasses12.jar;
就是这样
classpath=.;E:oracleora90jdbclibclasses12.jar;
|
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@服务器ip:1521:sid",username,password);
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@服务器ip:1521:sid",username,password);