Title: Loading resources with getResourceI have a number of plugins for various uses. Sometimes I need to load resources, such as image files, etc. I usually do it via MyClass.class.getClassLoader.GetResource(resourceName). This works fine in plugins. But if I use this in a simple Java app (e.g. With a static main() method) the loading of the resource always fails. The classloader finds the various classes of the app without problem, but can’t seem to find the resource.
Is there a good way to do this? Or am I simply missing something?