If we have a project on the computer in a directory that contains spaces (example: C:\Documents and Settings\Projects\MyProject), the library resolves the path of the directories by calling the method URL.getFile().
The paths contain %20 characters instead of spaces.
When the library checks if the directory exists (File.exists()), then it does not find the directory.
The solution is to replace URL.getFile() by URL.toURI().getPath().
If we have a project on the computer in a directory that contains spaces (example: C:\Documents and Settings\Projects\MyProject), the library resolves the path of the directories by calling the method
URL.getFile()
. The paths contain%20
characters instead of spaces. When the library checks if the directory exists (File.exists()
), then it does not find the directory.The solution is to replace
URL.getFile()
byURL.toURI().getPath()
.References : https://community.oracle.com/tech/developers/discussion/2058345/url-getfile-outputs-20-as-space https://stackoverflow.com/questions/3263560/sysloader-getresource-problem-in-java