title: Java, Classpath, Classloading => Multiple Versions of the same jar/project
body: <p>I know this may be a silly question for experienced coders. But I have a library (an http client) that some of the other frameworks/jars used in my project require. But all of them require different major versions like:</p>
  
  <pre><code>httpclient-v1.jar =&gt; Required by cralwer.jar
  httpclient-v2.jar =&gt; Required by restapi.jar
  httpclient-v3.jar =&gt; required by foobar.jar
  </code></pre>
  
  <p>Is the classloader intelligent enough to seperate them somehow? Most likely not? How does the Classloader handle this, in case a Class is the same in all three jars. Which one is loaded and why? </p>
  
  <p>Does the Classloader only pickup exactly one jar or does it mix classes arbitrarily? So for example if a class is loaded from Version-1.jar, all other classes loaded from the same classloader will all go into the same jar? </p>
  
  <p>How do you handle this problem?</p>
  
  <p>Is there some trick to somehow "incorporate" the jars into the "required.jar" so that the are seen as "one unit/package" by the <code>Classloader</code>, or somehow linked?</p>