import java.sql.*; public class DbConnexion { private static final String URL = "jdbc:mariadb://dwarves.iut-fbleau.fr/---"; private static final String USER = "login"; private static final String PASSWORD = "mdp"; public static Connection getConnection() throws SQLException { try { Class.forName("org.mariadb.jdbc.Driver"); } catch (ClassNotFoundException e) { throw new SQLException("Pilote MariaDB non trouvé.", e); } return DriverManager.getConnection(URL, USER, PASSWORD); } }