title: How to load classes from jar file in correct order
body: <p>I have written a Java Classloader to load classes from a jar file.</p>
  
  <pre><code>Enumeration&lt;JarEntry&gt; entries = jarFile.entries();
      while (entries.hasMoreElements()) {
          JarEntry element = entries.nextElement();
          if (element.getName().endsWith(".class")) {
                 //Class Manipulation via ASM
                 //Loading class with MyClassloader
          }
      }
  </code></pre>
  
  <p>The Problem is:
  When I load a Class, which Sublcass from a Class in the same Jar and the subclass isn't already loaded, I get a ClassNotFoundException.</p>
  
  <p>Example:</p>
  
  <pre><code>class A extends B{}
  Class B{}
  </code></pre>
  
  <p>Because of the alphabetical order, Class A is loaded first. I Get a ClassNotFoundException for Class B. At this time, Class B isn't loaded.</p>