Red Hat Bugzilla – Bug 987769
java -version output makes parsing difficult
Last modified: 2015-02-17 11:19:55 EST
Description of problem:
openjdk-1.8.0 changed the java -version output. Now it prints "openjdk version ..." instead of "java version ...". Although it is probably intentional change it is causing problems for tools that are parsing the output to find out the java version. For example LSB test suite cannot be built.
I am not avare if there is any "recommendation" or "standard" covering this but I believe that lines 2,3 sufficiently emphasize that it is openjdk java and that the first line should be in "expected" format.
# java -version
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal-0)
OpenJDK 64-Bit Zero VM (build 25.0-b20-internal, interpreted mode)
# java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (fedora-188.8.131.52.fc19-ppc64)
OpenJDK 64-Bit Zero VM (build 23.7-b01, interpreted mode)
# /usr/lib/jvm/java-1.5.0-ibm-184.108.40.206.3.ppc64/jre/bin/java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pxp64devifx-20130702 (SR16 FP3 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux ppc64-64 j9vmxp6423ifx-20130613 (JIT enabled)
J9VM - 20130611_151893_BHdSMr
JIT - 20121221_30553_r8
GC - 20120911_AA)
JCL - 20130702
Thanks for reporting the issue.
The OpenJDK project made this change upstream. If I had to guess why they chose this, I would go with "because java 8 is not final, so claiming that it's java 8 makes no sense". But that's just a guess.
I have passed this query upstream:
Lets see what they have to say.
We've had this filed as an IcedTea bug for a while:
Looks like upstream is pretty much set on keeping the output as it is (there was some mention of licensing and legal). You can find the entire discussion here:
I would prefer to follow what upstream is doing, if possible.
Upstream is sticking with 'openjdk version...' for now.
also please see - https://bugzilla.redhat.com/show_bug.cgi?id=988394 wea re going to change Java version in jdk8 even more
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 19 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.