code: public static ClassLoader getContextClassLoader() {
          return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
              @Override
              public ClassLoader run() {
                  ClassLoader cl = null;
                  try {
                      cl = Thread.currentThread().getContextClassLoader();
                  } catch (final SecurityException ex) {
                      // fall through
                  }
                  return cl;
              }
          });
      }
docs: Get the context class loader.
  
  @return the context class loader, otherwise null security privilages are not set.