Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.*;
- import org.*;
- import com.mysql.jdbc.Driver;
- public class JdbcLogin {
- public String Login;
- public String MotDePasse;
- private boolean Logged = false;
- public void StartBdd(){
- String driverName = "com.mysql.jdbc.Driver";
- Class.forName(driverName); // here is the ClassNotFoundException
- String serverName = "localhost";
- String mydatabase = "suptodo";
- String url = "jdbc:mysql://" + serverName + "/" + mydatabase;
- String username = "root";
- String password = "azerty";
- Connection connection = DriverManager.getConnection(url, username, password);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement