我是 java 初学者,在连接 JDBC 连接时遇到问题,java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
运行代码时出现“”错误。这是我的源代码
import java.sql.*;
public class Connect
{
public static void main(String[] args)
{
try
{
Class.forName("oracle.jdbc.OracleDriver");
System.out.println("Drivers Loaded");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:SYSTEM/rambabu@localhost:8081:XE");
System.out.println("Connection established");
con.close();
}
catch(Exception e)
{
System.out.println(e);
}
}
}