All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bugtests.test338cl Maven / Gradle / Ivy

Go to download

Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.

There is a newer version: 2.7.4
Show newest version

import java.io.*;

public class test338cl extends ClassLoader {

    protected Class loadClass(String name, boolean resolve)
        throws ClassNotFoundException
    {
//System.out.println("MyLoadClass " + name);
        Class c = findLoadedClass(name);
        if (c != null)
            return c;

        try {
            FileInputStream fis = new FileInputStream(name.replace('.', '/') + ".class");
            int size = fis.available();
            byte[] buf = new byte[size];
            fis.read(buf);
            fis.close();

            c = defineClass(name, buf, 0, buf.length);
            if (resolve)
                resolveClass(c);
            return c;
        } catch (IOException exc) {
            return super.loadClass(name, resolve);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy