Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package firstconnection;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- class DB {
- final String JDBC_DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
- final String URL = "jdbc:derby;sampleDBcreate=true" ;
- final String USERNAME = "" ;
- final String PASSWORD = "" ;
- public DB() {
- try {
- Connection conn = DriverManager.getConnection(URL);
- System.out.println("A híd létrejött.");
- } catch (SQLException ex) {
- System.out.println("Valami hiba van" + ex);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement