When running the application's main method directly on Java 11 or later the TCCL won't, typically, be a URLClassLoader so the classpath is logged as unknown. When using the launcher, LaunchedURLClassLoader will be the TCCL and the problem won't occur. There are various other ways to get the classpath, such as using the java.class.path system property that we could look at using instead.

I think it's debatable whether ClasspathLoggingApplicationListener is still useful. It was added prior to 1.0 and things have moved on since then. For example, we now have failure analysers for classpath-related problems such as NoSuchMethodError. We could consider removing the listener entirely.

Comment From: wilkinsona

The listener is public API so it'll need to be deprecated first and then removed in a subsequent release. Moving to 2.4.