try // Register the driver DriverManager.registerDriver(new Driver());
try (Connection conn = DriverManager.getConnection(url, user, pass); PreparedStatement pstmt = conn.prepareStatement(sql)) driver jdbc postgresql
There are several reasons why you might choose to use the JDBC driver for PostgreSQL: try // Register the driver DriverManager