I would like to create a separate folder for my resources in a Java project. How, in the name of God do I achieve such a simple thing ? I have been trying to get it to work for quite some time now and it starts to drive me nuts. Here is what I have tried so far:
1) I opened my Build Path Settings and added a folder to my source folders called "resources".
2) I added two folders to that folder called "font" and "img" containing images and font files.
3) I try to access those files in code like this:
getClassLoader() is said to give me an absolute path, so I take a path without the leading /:
getClass().getClassLoader().getResourceAsStream("resources/font/MyFont.otf") which returns null. Why is file management in eclipse so infuriating ?