Accepted answer

As you can see from the error log, the path you're providing is being converted to a URL (for example SPACE becomes %20). You should use the fromURL method Source.fromURL(Source.getClass().getResource("/lesson4/test.txt")) docs


You have spaces in your path converted to encoded from the URL.

Related Query

More Query from same tag