Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClasspathLoggingApplicationListener logs the classpath as unknown on Java 11 and later #23138

wilkinsona opened this issue Aug 30, 2020 · 1 comment


Copy link

@wilkinsona wilkinsona commented Aug 30, 2020

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.

Copy link
Member Author

@wilkinsona wilkinsona commented Nov 3, 2020

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

@wilkinsona wilkinsona closed this in 4c777c6 Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants