Erste Klasse Datenbankeinbindung

This commit is contained in:
Mats Pape 2021-12-20 12:34:52 +01:00
parent 9c028dd79e
commit 5e57dfa022
2 changed files with 21 additions and 0 deletions

View File

@ -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();
}
}
}

View File

@ -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;