try {
} catch (SQLException e) {
e.printStackTrace();
} catch (SQLRecoverableException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (SQLException e) {
if (e.getErrorCode() == 1017) {
} else if (e.getErrorCode() == 12541) {
} else {
}
}
String url = "jdbc:oracle:thin:@localhost:1521:xe";
String username = "user";
String password = "password";
Connection connection = DriverManager.getConnection(url, username, password);