Eclipse getResourceAsStream returning null

后端 未结 6 1773
鱼传尺愫
鱼传尺愫 2020-12-10 04:15

I cannot get getResourceAsStream to find a file. I have put the file in the top level dir, target dir, etc, etc and have tried it with a \"/\" in front as well. Everytime

6条回答
  •  醉话见心
    2020-12-10 04:53

    Also make sure your file does not match any pattern of Preference>Java>Compiler>Building>OutputFolder>Filtered resources:.

    For example, if you set *.txt in that field, you will not get test.txt to the build output.

提交回复
热议问题