Possible duplication (solved): https://stackoverflow.com/a/1133132/783469
I have icons (jpg, png) for my application, which is stored in
I usually use class.getResource for this kind of operation :
YourClass.class.getResource("image/button1.png")
i use it to retrieve the file from a jar archive but should work also to retrieve from filesystem resources.