Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String jdbcURL = "jdbc:derby:test;create=true";
- String user = "app";
- String password = "app";
- Connection connection = null;
- public static Connection getConnection() {
- try {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
- connection = DriverManager.getConnection(jdbcURL, user, password);
- System.out.println("Connected");
- return connection;
- } catch (Exception ex) {
- System.out.println("message: " + ex.getMessage() + "nNot connected");
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement