How to load resources from base module

wzberger javadevlist at javasoft.de
Wed May 17 09:54:07 UTC 2017


Looks like I'm having an encapsulation issue with resources. Class B 
belongs to module b and extends Class A in module a. Class B provides 
resources which should be loaded from base class A.

However, calling

   getInstance().getClass().getResource(...)

from a static method in class A fails while calling from class B works 
fine. Because getInstance() returns Class B I wonder why the resource 
can't be loaded. Any recommendation on how to get this working?

Thanks,
   Wolfgang



More information about the jigsaw-dev mailing list