I have a jar or war.
I’m programmaticaly reading this jar, and when I find jar inside this jar I’d like to programmaticaly read it again.
But JarFile provides only getInputStream, which I cannot pass to JarFile(File file) constructor.
How to read jar from jar?
EDIT: I was thinking about getting the File somehow from classloader or so.
you can create jar file in File System, something like
and write Stream into it. After that you can construct your JarFile(tempFile) and handle it…
Forget about it if program is running as unsigned applet/JNLP since you will not have right to create file in file system…