title: Websphere Classloading
body: <p>We have an application deployed in Websphere application server 7. Its deployed and functioning in various environments. But it gave a method not found exception in one new env. On digging deeper we found that a particular class was present in 2 jars and the class from the "wrong" jar was getting loaded in the new env. i went through the detailed class loader view and the sequence of the loading of jars were different in it.</p>
  
  <p>On further investigation there seemed to be random variance in the order in which the jar files were loaded in each env.</p>
  
  <p>2 questions:</p>
  
  <p>1) On which factor does the WAS class loading policy depend &amp; any suggestion for rectifying the problem?</p>
  
  <p>2) More generally when we specify supposing *.jar in the classpath for any java program how does any JVM load the jars? Like is it alphabetical or according to time modified or any such file property?</p>