I had the impression that Class.forName(String className) used the Thread.currentThread().getContextClassLoader() to load the class but apparently that isn’t the case.
Hence my question, what ClassLoader does Class.forName use by default? is it the ClassLoader.getSystemClassLoader()?
and what’s the difference between Thread.currentThread().getContextClassLoader() and ClassLoader.getSystemClassLoader()?
It uses the caller’s classloader. From the documentation: