getResourceAsStream() is returning null. Properties file is not loading

前端 未结 6 1296
眼角桃花
眼角桃花 2020-12-09 16:23

I am trying to load properties file. Here is my structure

\"Directory

Now i am trying to lo

6条回答
  •  甜味超标
    2020-12-09 16:42

    You're passing a file path to getResourceAsStream(String name), but name here is a class path, not a file path...

    You could make sure the file is on your classpath, or use a FileInputStream instead.

提交回复
热议问题