public class hellorAction extends Action {
private Connection con= null; public hellorAction() {
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
System.out.println("!!!!!!!!!");
con = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL","test","TEST");
System.out.println("???????????");
} catch (SQLException e) {
System.out.println("数据库加载失败");
e.printStackTrace();
}catch (ClassNotFoundException e) {
System.out.println("0000000000000000000");
e.printStackTrace();
}
}
con = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL","test","TEST");
执行到这句出的问题,catch后面的都没执行。