title: What is the purpose of 'Class.forName("MY_JDBC_DRIVER")'?
body: <p>I understand that class loading is useful for load the class at runtime with its class name.</p>
  <p>However while using JDBC in our project we know which driver we are going to use and mostly driver manager string is hard coded.</p>
  <p>My question is: Why are we loading driver using <code>Class.forName(&quot;JDBC_DRIVER&quot;)</code> here?<br />
  Why can't we go ahead adding the driver in class path? since we know which driver jar we are going to use.</p>
  <p>I believe <code>Class.forName(JDBC_DRIVER)</code> will load the Driver into <code>DriverManager</code>. Is it the only reason?</p>
  <p><strong>Edit 1:</strong></p>
  <p>The <a href="http://docs.oracle.com/javase/6/docs/api/index.html?overview-summary.html" rel="noreferrer"><code>DriverManager</code> API doc</a> states that</p>
  <blockquote>
  <p>As part of its(DriverManager) initialization, the DriverManager class will attempt to load the driver classes referenced in the &quot;jdbc.drivers&quot; system property.</p>
  <p>Applications no longer need to explictly load JDBC drivers using <code>Class.forName()</code>. Existing programs which currently load JDBC drivers using <code>Class.forName()</code> will continue to work without modification.</p>
  </blockquote>
  <p>Then when I use other than oracle driver; do I need to change the driver name string in system property?</p>