Hello, I did a college job using java screens using ide netbeans, I made crud in the database, using postgresql as the main bank, I got it done and everything, but I would like to just send the jar to the teacher, in my computer the jar works, but in another it does not find the database, how do I "load" the database with the application?
My connection
public void Conectabd() throws ClassNotFoundException {
conectdbd();
CriarBd();
}
public static Connection conectdbd() throws ClassNotFoundException {
try {
Class.forName("org.postgresql.Driver");
Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:3306/bdoficina", "postgres", "diego");
return con;
} catch (SQLException error) {
JOptionPane.showMessageDialog(null, error);
return null;
}
}