title: ClassNotFoundException when I am trying to connect to PostgreSQL with JDBC
body: <p>I have a problem trying to connect to PostgreSQL 11 using Java 10.0.2. I am using an Eclipse 2018-09 IDE. 
  So first, I downloaded the driver postgresql-42.2.5 and I located it in the folder lib of my jdk-11. Then I tried to execute the following code:</p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.DriverManager;
  
  public class Connect {
  
      public static void main(String[] args) {
          try {
              Class.forName("org.postgresql.Driver");
              System.out.println("Driver O.K.");
  
              String url = "jdbc:postgresql://localhost:5432/Ecole";
              String user = "postgres";
              String passwd = "postgres";
  
              Connection conn = DriverManager.getConnection(url, user, passwd);
              System.out.println("Connection succeded !");
  
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  } 
  </code></pre>
  
  <p>That doesn't seem to work because I got a <code>ClassNotFoundException</code>:</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.postgresql.Driver
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
      at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Unknown Source)
      at Connect.main(Connect.java:8)
  </code></pre>
  
  <p>As an other attempt (which I don't know if it could help) I tried to add a user Library from the IDE and add the path of the Driver manually (eventually it did not help), and as a result I got the exact same error as above.</p>
  
  <p>I could use any help as a beginner in java, thank you!</p>