That might not always work. The JVM will look for the file relative to the working directory and not relative to the class file. The working directory may be different to the location of the class...
Type: Posts; User: Junky
That might not always work. The JVM will look for the file relative to the working directory and not relative to the class file. The working directory may be different to the location of the class...
I cannot see you screen therefore I have no idea what your code looks like, what your file looks like, where your file is located. Basically I am relying on information provided by you which is next...
Did you fail to read the last sentence?
Isn't the exception self-explanatory? The JVM cannot find the file. Either you have misspelled the name or the file is not in the correct location (most likely reason). Try using an absolute path...