title: Same class is in multiple jar
body: <p>I have several jars containing the exact same class. </p>
  
  <p>Lets say for example, A.jar and B.jar have the same class Hello.class. What will happen if I run the following:</p>
  
  <p>java -classpath A.jar;B.jar com.testing.testcode</p>
  
  <p>My question is whether it will run or not? As from my understanding class loader will scan the classpath and it will return whatever Hello.class it finds first.</p>
  
  <p>I know I can avoid this problem if I use OSGi for loading a particular class.</p>
  
  <p>But what my question is – whether this will run or not? Or the java -classpath A.jar;B.jar com.testing.testcode will break down for having two version of the same class.</p>