Based on the discussion on stackoverflow: https://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader The Thread.currentThread().getContextClassLoader() should never be used because the context classloader is not immutable, user can overwrite it when thread switches, it is also nullable. The objection here: https://stackoverflow.com/a/36228195 says the Thread.currentThread().getContextClassLoader() is a JDK design error and the context classloader is never suggested to be used. The API that needs classloader should ask the user to set up the right classloader.