diff --git a/Happy_Bird/src/main/java/MariaDB.java b/Happy_Bird/src/main/java/MariaDB.java new file mode 100644 index 0000000..d5b75f1 --- /dev/null +++ b/Happy_Bird/src/main/java/MariaDB.java @@ -0,0 +1,20 @@ +import java.beans.Statement; +import java.sql.*; +public class MariaDB +{ + public String username; + public String pw; + public String url; + public String driver; + Connection con; + Statement st; + + public MariaDB() + { + try { + con = DriverManager.getConnection("jdbc:mariadb://localhost:3306/DB?user=root&password=HappyBird1"); + } catch (SQLException e) { + e.printStackTrace(); + } + } +} diff --git a/Happy_Bird/src/main/java/module-info.java b/Happy_Bird/src/main/java/module-info.java index ca73f7f..4bc785c 100644 --- a/Happy_Bird/src/main/java/module-info.java +++ b/Happy_Bird/src/main/java/module-info.java @@ -2,6 +2,7 @@ module com.example.happy_bird { requires javafx.controls; requires javafx.fxml; requires java.desktop; + requires java.sql; opens com.example.happy_bird to javafx.fxml;