@Override
    protected Class<?> findClass(String name) throws ClassNotFoundException {
        Class result = classesHash.get(name);

        if (result != null) {
            System.out.println("% Class " + name + " found in cache");
            return result;
        }

        if (name.toLowerCase().contains("truestatic"))
            return findSystemClass(name);

        File f = findFile(name.replace('.', '/'), ".class");
        System.out.println("% Class " + name + (f == null ? "" : " found in " + f));

        if (f == null) {
            //call system find class
            return findSystemClass(name);
        }

        try {
            byte[] classBytes = loadFileAsBytes(f);
            result = defineClass(name, classBytes, 0, classBytes.length);
        } catch (IOException e) {
            throw new ClassNotFoundException("Cannot load class " + name + ": " + e);
        } catch (ClassFormatError e) {
            throw new ClassNotFoundException("Format of class file incorrect for class " + name + ": " + e);
        }
        classesHash.put(name, result);
        return result;
    }