Maldito JDBC para MYSQL
Publicado por webness (14 intervenciones) el 07/07/2005 18:31:16
Hola, tengo este codigo de coneccion al driver de JDBC para mysql
public void setConnection()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
this.con=DriverManager.getConnection(this.url,this.login,this.password);
}
catch(ClassNotFoundException e){ System.out.println(); }
catch(IllegalAccessException e){ System.out.println(); }
catch(InstantiationException e){ System.out.println(); }
catch(SQLException e){ System.out.println(); }
}
Lo compilo y me aparecen estos errores
exception java.lang.IllegalAccessException is never thrown in body of corresponding try statement
catch(IllegalAccessException e){ System.out.println(); }
exception java.lang.InstantiationException is never thrown in body of corresponding try statement
catch(InstantiationException e){ System.out.println(); }
Que significa eso???'
public void setConnection()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
this.con=DriverManager.getConnection(this.url,this.login,this.password);
}
catch(ClassNotFoundException e){ System.out.println(); }
catch(IllegalAccessException e){ System.out.println(); }
catch(InstantiationException e){ System.out.println(); }
catch(SQLException e){ System.out.println(); }
}
Lo compilo y me aparecen estos errores
exception java.lang.IllegalAccessException is never thrown in body of corresponding try statement
catch(IllegalAccessException e){ System.out.println(); }
exception java.lang.InstantiationException is never thrown in body of corresponding try statement
catch(InstantiationException e){ System.out.println(); }
Que significa eso???'
Valora esta pregunta


0