List of usage examples for java.sql DriverManager getConnection
private static Connection getConnection(String url, java.util.Properties info, Class<?> caller) throws SQLException
From source file:controladores.controladorEmpleados.java
private Connection getConexion() { if (this.conexion == null) { try {/*from ww w. j av a 2 s . c om*/ DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); this.conexion = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "system", "javaoracle"); } catch (SQLException ex) { ex.printStackTrace(); } } return this.conexion; }