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

前端 未结 6 1279
眼角桃花
眼角桃花 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:24

    I had a similar problem with a file not being found by getResourceAsStream(). The file was in the resources folder (src/main/resources), and still not found.

    The problem got resolved when I went into the eclipse Package Explorer and "refreshed" the resources folder. It was in the directory, but Eclipse did not see it until the folder was refreshed (right-click on the folder and select Refresh).

提交回复
热议问题