I\'m loading a text file from within a package in a compiled JAR of my Java project. The relevant directory structure is as follows:
/src/initialization/Life
You might want to try this to get the stream i.e first get the url and then open it as stream.
URL url = getClass().getResource("/initialization/Lifepaths.txt"); InputStream strm = url.openStream();
I once had a similar question: Reading txt file from jar fails but reading image works