daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Apr 29th, 2017 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void openConnection() throws SQLException, ClassNotFoundException {
  2.         if (c != null && !c.isClosed()) {
  3.             return;
  4.         }
  5.         synchronized (this) {
  6.             if (c != null && !c.isClosed()) {
  7.                 return;
  8.             }
  9.             Class.forName("com.mysql.jdbc.Driver");
  10.             c = DriverManager.getConnection("jdbc:mysql://" + MSPMain.host+ ":" + MSPMain.port + "/" + MSPMain.database, MSPMain.username, MSPMain.password);
  11.         }
  12. }
  13. try {
  14.     openConnection();
  15. }
  16. catch (SQLException e) {
  17.     console.sendMessage(prefix+"Error creating default table `players`:");
  18.     console.sendMessage(e.getMessage());
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top