I try to load a property-file that is here
With the following code (in a static context, no Objects are initialized from me right now):
Why do I load it this way? First I use the class Object because getResourceAsStream() is not static and I learned through googling that I should use this method to load my property-file. Then I use a / that Java does not look relative to my Main.java, but the Project. Though, I still get null using that.
*How can this not work, if there is a file in that exact place? What does Java do here?*
以上就是Reading Resources correctly in Eclipse with Java的详细内容，更多请关注web前端其它相关文章！