I have a jar file that contains two files in the root
tbs.jar
-parser.dat
-MapScript.txt
I’ve tried to access them with:
getClass().getResource(“parser.dat”)
and I also tried:
getClass().getResource(“/parser.dat”)
but neither works. The class that I’m using, the class I call “getClass” on, belongs to a package that lies in the same jar. So how am I supposed to refer to the files in the same jar, should I perhaps try “../parser.dat”? Nothing I try seems to work.
I have a jar file that contains two files in the root tbs.jar -parser.dat
Share
try replacing
with