Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Database() {
- try {
- Class.forName("org.postgresql.Driver");
- } catch (ClassNotFoundException cnfe) {
- System.out.println("" + cnfe);
- }
- try {
- Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/tomcat", "root", "root");
- statement = (Statement) connection.createStatement();
- } catch (SQLException ex) {
- Logger.getLogger(create.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
Add Comment
Please, Sign In to add comment