public JavaClass readFromClassPath(String classFile) throws IOException {
  Thread thread=Thread.currentThread();
  ClassLoader loader=thread.getContextClassLoader();
  InputStream is=loader.getResourceAsStream(classFile);
  try {
    return parse(is);
  }
  finally {
    is.close();
  }
}

public JavaClass readFromClassPath ( String classFile ) throws IOException { Thread thread = Thread . currentThread ( ) ; ClassLoader loader = thread . getContextClassLoader ( ) ; InputStream is = loader . getResourceAsStream ( classFile ) ; try { return parse ( is ) ; } finally { is . close ( ) ; } }
reads the class from the classpath .
