Try using the java.util.jar
API. Specifically, take a look at JarFile.getEntry()
and JarFile.getInputStream()
. For example:
JarFile jarFile = new JarFile(new File("Project.jar"));
ZipEntry entry = jarFile.getEntry("text.txt");
InputStream is = jarFile.getInputStream(entry);
// write InputStream to file