How do you read a text file from a resources folder in java 1.7?
<p>Hi I have been working on a project in java 1.7 and have come across a problem. I am populating some arrays from text files which are stored in the project in a resources folder.</p>

<p>The problem i'm having is that the files are not being read from them unless they are in the package even when i try setting paths and such. What I mean by this is that the text file will not work if it's in the resource folder that has been set as the source.</p>

<p><a href="http://i.stack.imgur.com/jZugM.png" rel="nofollow">This is a link to a picture of my file structure within my project.</a></p>

<p><a href="http://i.stack.imgur.com/ldeH8.png" rel="nofollow">This is a link to a picture of my text file loader.</a></p>

<p>I have had a look at some other questions but all of them just explain how to read files from for example the C drive, whereas I would like to know how to read from a file bundled inside of the finished jar file. </p>

<p>I would really appreciate any help that I can get as i've been trying to fix this for several days with no luck.</p>