Inputstream Load resource file in java 9

I have trouble with inputstreamreader in java 9 and inputstream, error is java.lang.NullPointerException, and related to proper resource location.

The calling code is in "default package" in src folder and the "resources" folder is a subfolder of "src", like this :


-default package

- ...


With java 1.8, the code :

ClassLoader.class.getResourceAsStream("/resources/villes.csv" )

is properly working.

I have seen some answers here but don't know how to apply to my case.

Thank you for any help !


Read More »

By: StackOverFlow - Friday, 13 April

Related Posts