I have a jar file with resources (mainly configuration for caches, logging, etc) that I want to distribute.
I\'m having a problem with the relative path
I usually store files and other resources and then retrieve them as URLs:
URL url = MyClass.class.getResource("/design/someResource.png");
Within a static context, or otherwise:
URL url = getClass().getResource("/design/someResource.png");
From an instance.
The above snippets assume that design is a top level folder within the jar. In general, if the path begins with a "/" it assumes an absolute path, otherwise it's relative from the class location.