利用java连接oracle数据库的时候报错:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
错误位置为: Class.forName("oracle.jdbc.driver.OracleDriver");
import java.sql.*;
public class Oracleconnect {
public static void main(String[] args) {
// TODO Auto-generated method stub
ResultSet rs = null;
Statement stmt = null;
Connection conn = null;
System.out.println("数据库开始加载");
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("数据库加载成功");
//new oracle.jdbc.driver.OracleDriver();
conn = DriverManager.getConnection("jdbc:oracle:thin:@10.213.54.18:1521:bdspoc", "scott","tiger");
//conn = DriverManager.getConnection("jdbc:oracle:thin:@hncs", "scott","tiger");
stmt = conn.createStatement();
rs =