title: Can a directory be added to the class path at runtime?
body: <p>In order to better understand how things works in Java, I'd like to know if I can dynamically add, at runtime, a directory to the class path.</p>
  
  <p>For example, if I launch a <em>.jar</em> using <em>"java -jar mycp.jar"</em> and output the <em>java.class.path</em> property, I may get:</p>
  
  <pre><code>java.class.path: '.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java'
  </code></pre>
  
  <p>Now can I modify this class path at runtime to add another directory? (for example before making the first call to a class using a <em>.jar</em> located in that directory I want to add).</p>