Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- String url = "jdbc:mysql://HOST/DATABASE";
- conn = DriverManager.getConnection(url, "username", "password");
- doTests();
- conn.close();
- }
- catch (ClassNotFoundException ex) {System.err.println(ex.getMessage());}
- catch (IllegalAccessException ex) {System.err.println(ex.getMessage());}
- catch (InstantiationException ex) {System.err.println(ex.getMessage());}
- catch (SQLException ex) {System.err.println(ex.getMessage());}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement