private byte[] loadClassFromJarOrZip(String path, String name) {
        File archiveFile = new File(path);
        if (archiveFile.exists() == false) {
            return null;
        }

        ZipFile zipFile = null;

        try {
            zipFile = new ZipFile(archiveFile);
        } catch (IOException ex) {
            return null;
        }

        ZipEntry entry = zipFile.getEntry(name);
        if (entry == null) {
            return null;
        }

        try {
            InputStream is = zipFile.getInputStream(entry);
            int size = (int) entry.getSize();
            byte[] buffer = new byte[size];
            for (int pos = 0; pos < size; pos += is.read(buffer, pos, size - pos))
				;

            zipFile.close();
            return buffer;
        } catch (IOException ex) {
        }

        return null;
    }