Add if conditionals to only loop through a .class file or what ever else you need from the Jar
It's damn basic but people have asked for it

Code:
JarFile jarFile = new JarFile("./input.jar");
Enumeration<JarEntry> enumeration = jarFile.entries();
while (enumeration.hasMoreElements()) {
	JarEntry jarEntry = enumeration.nextElement();
	System.out.println(jarEntry.getName());
}
jarFile.close();