Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void connect() throws SQLException,ClassNotFoundException{
- Class.forName("com.mysql.jdbc.Driver");
- connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database + username + pasword);
- statement = connection.createStatement();
- /*if(connection != null && !connection.isClosed()){
- return;
- }
- synchronized (Core.getInstance()){
- if(connection !=null && !connection.isClosed()){
- return;
- }
- }
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement