On Fri, 8 Nov 2024 09:28:07 GMT, Alan Bateman <al...@openjdk.org> wrote:
> On the surface this looks okay but just to double check: this has no impact > on `java -cp <classpath> -jar app.jar`. The class path in that case is > `app.jar`, the class path specified to -cp is ignored. That's right - the launcher explicitly overrides the classpath in that case here https://github.com/openjdk/jdk/blob/master/src/java.base/share/native/libjli/java.c#L313: /* Override class path if -jar flag was specified */ if (mode == LM_JAR) { SetClassPath(what); /* Override class path */ } ------------- PR Comment: https://git.openjdk.org/jdk/pull/21971#issuecomment-2464377538