You need to get the resource location as a URL. Files inside a JAR file can be accessed by a URL. Have a look at
http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html
If the file is in your classpath, either by a directory or a JAR file, then this will work. |