title: No suitable driver found when invoking DriverManager from class constructor
body: <p>Added mysql-connector-java-5.1.22-bin.jar to the library. Created a class, imported all the java.sql packages. Have public static void main and a constructor. In the <code>main</code>, added the line ...</p>
  
  <pre><code>DriverManager.getConnection("jdbc:mysql://localhost/lookups", "root", "dummyPWd")
  </code></pre>
  
  <p>It does not throw an exception and I can do stuff with the database. Add the same line to the Constructor and I get an error:</p>
  
  <blockquote>
    <p>No suitable driver found ...</p>
  </blockquote>
  
  <p>Why would it work in <code>main</code> method but not inside a class constructor?</p>