I have a project in which I want to access a resource in a JAR from another project. This is not for my class, so ClassLoader is not an option. I tried:
new FileInputStream("C:\\mydir\\my.jar!\\myresource.txt");
and got a FileNotFoundException.
JarInputStream may be an option, but I want the flexibility of the input file name to be a jar resource or just a file on the system (user decides). Is there a class that can do this, or should I build it myself?
User1 source
share