Problem
On JDK 9+, the system class loader is not a URLClassLoader and the ucp field lives on a superclass. ClassLoaderUtils.addURL throws NoSuchFieldException: ucp, breaking Hadoop conf directory loading.
Proposed solution
- Try TCCL and system class loader in order
- Walk the class hierarchy to locate
ucp on JDK 9+ built-in loaders
- Keep
URLClassLoader.addURL path for older JDKs
Problem
On JDK 9+, the system class loader is not a
URLClassLoaderand theucpfield lives on a superclass.ClassLoaderUtils.addURLthrowsNoSuchFieldException: ucp, breaking Hadoop conf directory loading.Proposed solution
ucpon JDK 9+ built-in loadersURLClassLoader.addURLpath for older JDKs