I recently ran into getPath () problem.
my code looks something like this:
File path = new File(Main.class.getResource("/worlds/").getPath()); File[] files = path.listFiles();
Now the problem is that if there is a space in the Path to Basic class, path.listFiles() will return null . If there is no Space, everything works fine.
if I print the path to cmd, I see that every space is replaced with %20
Simiil
source share