title: Specification of class name when invoking findClass in Java Custom Class loader
body: <p>In a customer class loader, I have a method findClass as follows:</p>
  
  <pre><code> public Class findClass(String className){
      byte classByte[];
      Class result=null;
      result = (Class)classes.get(className);
      if(result != null){
          return result;
      }
  
  
      try{
          return findSystemClass(className);
      }catch(Exception e){
      }
      try{
         String classPath =    
    ((String)ClassLoader.getSystemResource(className.replace('.',File.separatorChar)+".class").getFile()).substring(1);
         classByte = loadClassData(classPath);
          result = defineClass(className,classByte,0,classByte.length,null);
          classes.put(className,result);
          return result;
      }catch(Exception e){
          return null;
      } 
  }
  </code></pre>
  
  <p>How do I specify the name of a class that I'm trying to find if the class is in the default package.   For example, if the class is named <code>myclass.class</code>, how do I pass this name to this method.   Calling it as <code>findClass("myclass")</code> or <code>findClass("myclass.class")</code>doesn't seem to work.   </p>