I need a bit of help trying to figure out an issue I'm having with my program. If I run my program as is in my IDE (before exporting it to an executable JAR) I am able load in a txt file with some values, modify that file by making a temporary copy of it, and then renaming the modified file to the name of the original or source file. However, when I create my JAR, I am only able to load in the original file. There is no way, apparently, to do a write to the source file because the JAR essentially locks down the text file I need to modify.
Now, my question is how can I simulate this copying of the source file, modification, and then renaming of the modified file to the original? Am I thinking about this all wrong? Here is my code I'm using thus far (the deleteFromFile method is where I am stuck in terms of getting this to work with my JAR):