@@ -0,0 +1,1463 @@
+import java.io.IOException;%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0A%0Apublic class DefineClass %7B%0A  private static File findHello(File directory) %7B%0A    File%5B%5D files = directory.listFiles();%0A    for (File file: directory.listFiles()) %7B%0A      if (file.isFile()) %7B%0A        if (file.getName().equals(%22Hello.class%22)) %7B%0A          return file;%0A        %7D%0A      %7D else if (file.isDirectory()) %7B%0A        File result = findHello(file);%0A        if (result != null) %7B%0A          return result;%0A        %7D%0A      %7D%0A    %7D%0A    return null;%0A  %7D%0A%0A  private static byte%5B%5D read(File file) throws IOException %7B%0A    byte%5B%5D bytes = new byte%5B(int) file.length()%5D;%0A    FileInputStream in = new FileInputStream(file);%0A    try %7B%0A      if (in.read(bytes) != (int) file.length()) %7B%0A        throw new RuntimeException();%0A      %7D%0A      return bytes;%0A    %7D finally %7B%0A      in.close();%0A    %7D%0A  %7D%0A%0A  public static void main(String%5B%5D args) throws Exception %7B%0A    byte%5B%5D bytes = read(findHello(new File(System.getProperty(%22user.dir%22))));%0A    Class c = new MyClassLoader(DefineClass.class.getClassLoader()).defineClass%0A      (%22Hello%22, bytes);%0A    c.getMethod(%22main%22, String%5B%5D.class).invoke(null, (Object) new String%5B0%5D);%0A  %7D%0A%0A  private static class MyClassLoader extends ClassLoader %7B%0A    public MyClassLoader(ClassLoader parent) %7B%0A      super(parent);%0A    %7D%0A%0A    public Class defineClass(String name, byte%5B%5D bytes) %7B%0A      return super.defineClass(name, bytes, 0, bytes.length);%0A    %7D%0A  %7D%0A%7D%0A

add DefineClass to test suite