Here you can find the source of getPostgresConnection()
public static Connection getPostgresConnection() throws ClassNotFoundException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Main { public static Connection getPostgresConnection() throws ClassNotFoundException { Class.forName("org.postgresql.Driver"); Connection connection = null; try {// ww w . j ava2 s .c o m connection = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432/jira", "postgres", "Jira733"); } catch (SQLException e) { System.out.println("Connection Failed! Check output console"); e.printStackTrace(); } return connection; } }