How to get the directory inside the jar?
Let's say I have a jar called foo.jar, how can I make the jar be able to access a file that's like this foo.jar!/text.txt
, whereas the class is like foo.jar!/randomPackage/Main.class
?
I'm able to do that while still in eclipse, but then when I export the program into a jar, it doesn't work.