Classpath loader issue

Issue #209 resolved
Benjamin Cordes created an issue

In utils we have this:

input = NuBot.class.getClass().getResourceAsStream(filename);

if (input == null) {
                LOG.severe("Sorry, unable to find " + filename);
                return false;
}

"Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader."

So as far as I understand this leads to unexpected behaviour in IDE's.. trying to find a fix

http://stackoverflow.com/questions/1921238/getclass-getclassloader-is-null-why

Comments (9)

  1. Benjamin Cordes reporter

    Better to load all files via relative path instead. After looking into it I don't see any reason to use resourceStream.

  2. Log in to comment