static ClassLoader setThreadContextClassLoader(Class cl) { if (getSecurityManager() == null) { final Thread thread = currentThread(); try { return thread.getContextClassLoader(); } finally { thread.setContextClassLoader(cl.getClassLoader()); } } else { return doPrivileged( new SetContextClassLoaderAction(doPrivileged(new GetClassLoaderAction(cl)))); } }