Why is java -version implemented in Java?
thomas.stuefe at gmail.com
Tue Dec 1 12:51:44 UTC 2020
Yes, from all the feedback I gathered it seems that -version, in its
current form, is here to stay.
Since there is "-Xinternalversion" which already does what I originally
wanted there is no pressing need to do anything. Unless one wants to change
the decidedly unsexy argument name, but that's a different issue :)
On Tue, Dec 1, 2020 at 10:57 AM Jonathan Dowland <jdowland at redhat.com>
> On Fri, Nov 20, 2020 at 05:22:15PM +0100, Thomas Stüfe wrote:
> > Or is using 'java -version' as a simple VM test just too convenient?
> I've used it as a quick way to get a valid java invocation in order to
> test other parameters (e.g. -XX:+UnlockDiagnosticVMOptions
> -XX:+PrintContainerInfo) without having to have a valid Java program
> (Jar, class, source file, etc.) around. I could use --dry-run, but I'd
> either need to keep HelloWorld.class to hand or tolerate the invocation
> error. On the other hand I can see the appeal of making bare "java
> -version" operate more quickly.
> Jonathan Dowland <jdowland at redhat.com>
> Senior Software Engineer, OpenJDK, Red Hat
More information about the jdk-dev