Salve.
Sto tentando di connettermi a postgresql con questa classe:
codice:
import java.sql.Connection;
import java.sql.DriverManager;

public class Main {

    public static void main(String args[]) {
        Connection con = null;
        try {
            Class.forName("org.postgresql.Driver");
            con = DriverManager.getConnection(
                    "jdbc:postgresql://localhost:5432/", "max",
                    "root");
        } catch (Exception e) {
            e.printStackTrace();
            System.err.println(e.getClass().getName() + ": " + e.getMessage());
            System.exit(0);
        }
        System.out.println("Opened database successfully");
    }

}
Ho importato il connettore:
postgresql-9.4.1208.jre6

La console mi da il seguente errore:
codice:
org.postgresql.util.PSQLException: FATALE: autenticazione con password fallita per l'utente "max"
    at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:433)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:208)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215)
    at org.postgresql.Driver.makeConnection(Driver.java:406)
    at org.postgresql.Driver.connect(Driver.java:274)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Main.main(Main.java:10)
org.postgresql.util.PSQLException: FATALE: autenticazione con password fallita per l'utente "max"
Grazie