/** * Reads JAR file and stored classes locally. * * @param fileName Name of file to read. * @throws IOException If read failed. */ private void readJarFile(String fileName) throws IOException { JarEntry je; JarInputStream jis = new JarInputStream(new FileInputStream(fileName)); while ((je = jis.getNextJarEntry()) != null) { String jarName = je.getName(); if (jarName.endsWith(".class")) loadClassBytes(jis, jarName); // Else ignore it; it could be an image or audio file. jis.closeEntry(); } }