I was having some issues getting the executable jar file for my project to work (outside of the eclipse IDE). I figured out the issue with java -jar fileName.jar
Here's the code:
fileIn = new Scanner(new File("src//resources//TestSave.txt"));
Through a little troubleshooting and research I understand that this wasn't working in the executable jar because it doesn't have a src folder, that's only created within the IDE. Here was my solution:
fileIn = new Scanner(new File("D://resources//TestSave.txt"));
The only problem with this is that if I want to put this program on my resume then who ever views it will have to place the folder into their D drive. I want it to be quick and easy so that they can just view my project with no hassle.
How can I access the resources folder within the executable jar file itself without having to reference/create any outside folders?