1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
...
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import com.mysql.jdbc.Driver;
public class maj02
{
Vector clients = new Vector();
Vector fichiers = new Vector();
public maj02() /*throws SQLException*/ {
try {
String nomDriver = "driver mysql";
try{
Class.forName("com.mysql.jdbc.Driver");
}catch(ClassNotFoundException cnfe){
System.out.println("La classe "+nomDriver+" n'a pas été trouvée");
cnfe.printStackTrace();
}
//Class.forName("com.mysql.jdbc.Driver").newInstance();
//DriverManager.registerDriver(new com.mysql.jdbc.Driver());
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/projetstage", "root", "" );
listecli();
listefich("windows");
con.close();
} catch (SQLException ex) {System.out.println(ex);}
}
... |
Partager