我的Oracle连接怎么报错呢
代码如下:程序代码:
public class MyCon { public static Connection getCon(){ Connection conn = null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XDF","jean","jean"); System.out.println(conn); } catch (Exception e) { e.printStackTrace(); } return conn; } public static void main(String[] args) { getCon(); } }
请教高手,急,在线等!