diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/ClassLoaderUtil.java b/flink-runtime/src/main/java/org/apache/flink/runtime/util/ClassLoaderUtil.java
index <HASH>..<HASH> 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/ClassLoaderUtil.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/ClassLoaderUtil.java
@@ -38,6 +38,9 @@ public final class ClassLoaderUtil {
 	 * 
 	 * <p>NOTE: This method makes a best effort to provide information about the classloader, and
 	 * never throws an exception.</p>
+	 *
+	 * <p>NOTE: Passing {@code ClassLoader.getSystemClassLoader()} on Java 9+ will not return
+	 * anything interesting.
 	 * 
 	 * @param loader The classloader to get the info string for.
 	 * @return The classloader information string.
@@ -103,6 +106,11 @@ public final class ClassLoaderUtil {
 						+ ExceptionUtils.stringifyException(t);
 			}
 		}
+		else if (loader == ClassLoader.getSystemClassLoader()) {
+			// this branch is only reachable on Java9+
+			// where the system classloader is no longer a URLClassLoader
+			return "System ClassLoader";
+		}
 		else {
 			return "No user code ClassLoader";
 		}
[FLINK-<I>][runtime] Adjust ClassLoaderUtils to Java 9

ClassLoaderUtil#getUserCodeClassLoaderInfo made an assumption that system classloaders were always URLClassLoaders, which no longer holds on Java9+. In this case it returned "no user code ClassLoader", but this would be confusing if it ever were printed at runtime.



We're adding another branch to cover this case, which should only reachable on Java 9,