I got that working for images in a folder, but I couldn't get that working for the database file at the top level of the jar, located outside any package. I finally broke down and used
and managed to locate it, but it felt wrong. I don't know why I couldn't load that file like I did the images - the only difference was, it wasn't in a package.
That brought to light a different error - now it can locate the file, but when it tries to create a new RandomAccessFile from it like this, it fails.
Which makes sense, since I also read you can't modify files in the JAR. But that does leave me with one pressing question: Will the reviewer be extracting the files from the JAR, before testing it? If not, I don't see how I can possibly modify this file.
Any suggestions?