GetClass (). getClassLoader (). getResourceAsStream throws NullPointerException
2 answers
Are you using approved standards ? I believe this will cause the classes to be loaded by the boot class loader, even if you cannot explicitly use -Xbootclasspath.
+1
source to share
From the documentation ...
public ClassLoader getClassLoader()
Returns the class loader for the class. Some implementations may use null to represent the bootstrap loader class. This method returns null in such implementations if this class was loaded by the bootstrap Loader class.
...
If this object represents a primitive type or void, null is returned.
+4
source to share