Using a text file in Eclipse...I'm confused
I am working on an app that has a large amount of static content - thousands of lines of data. My plan is to ultimately distribute a .jar that would include a file that contains this data (as text, XML, etc.) Some classes in the app read through this data and use it.
So...how do I access this file within Java? It's not a FileReader operation (I don't think) because it's "in the jar" not "on the filesystem".
Also, within Eclipse, as I'm working on the code, is there a way I can define it as a "will be in the jar" file in the Project? The file is defined in a subfolder in my src tree, but my attempts to access it haven't been successful.
If someone can recommend a breadcrumb trail, I can read up - I'm just asking what the best way to do that is.
Do I want to create an Ant task to create the jar every time I run tests or build? I'm using JUnit heavily for testing, so hopefully when I "Run As JUnit," that would work, too.