System cannot find path specified in a jar?
I'm trying to make a jar file but i keep getting "The system cannot find the path specified" from a resource.I only get the error when I launch it from a runnable jar file but not from an IDE.here are the lines of code that won't run on a a jar file.
File file = new File("src/scores/scores.txt");
PrintWriter b = new PrintWriter(file);
Re: System cannot find path specified in a jar?
When a file is inside the Jar, it's no longer a File, it's a Resource.
Check out the getResource() functions in the ClassLoader class.