I am trying to access a file in my project. But the getResource method returns null.
This is what my project looks like: 
Thread.currentThread().getContextClassLoader().getResource("assets/xxx.png"); //returns null
And what the project folder looks like in the eclipse workspace:

Why? I want to access files in a folder with my resources?
Edit I created a jar file, and this is the contents of the jar:

solvable
First of all, I have many image files, so I want to organize them all in a folder. I put the resource folder in the src directory and finally was able to access the files.
this.getClass().getClassLoader().getResource("assets/xxx.png");

amone source share