I have a java project in eclipse that uses a text file and some png's. Whenever I run it in eclipse it works perfectly, but when I export it, it doesn't get any information from the files. I am loading the files relative to the jar file, and I don't understand why it's not working. I am loading the images like so:

Image i = new ImageIcon(getClass().getResource("/images/file.png")).getImage();

and I am loading the image path like so:

getClass().getResource("/files/file.txt").getFile()

images and files are both packages in my project. Please help.