Boa tarde galera … como todo mundo ja fez isso eu tambem vo fazer… estou começando com java e oracle e estou realizando um teste com oracle… c… os tuto q achei sempre falam de configuracao de url…desse jeito:O que significa esse codigo:O que significa esse codigo: String url = “jdbc:<span class=“highlight”>oracle</span>”
POr favor… do jeito q eu coloquei ta errado?
package br.com.mgf.oracle;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class OracleFactury {
private static final String driver = "oracle.jdbc.driver.OracleDriver";
private static final String url = "jdbc:oracle:thin:@127.0.0.1:1521:xe";
private static final String user = "system";
private static final String password = "mgf";
public static Connection getConnection() throws SQLException {
try {
Class.forName(driver);
return DriverManager.getConnection(url, user, password);
} catch(ClassNotFoundException ex) {
System.out.println("Falta classe");
throw new SQLException(ex.getMessage());
}
}
}