Bug 987769 - java -version output makes parsing difficult
java -version output makes parsing difficult
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk (Show other bugs)
19
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Omair Majid
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 02:55 EDT by Karel Srot
Modified: 2015-02-17 11:19 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 11:19:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Srot 2013-07-24 02:55:02 EDT
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.

Examples:
# 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-2.3.10.3.fc19-ppc64)
OpenJDK 64-Bit Zero VM (build 23.7-b01, interpreted mode)

# /usr/lib/jvm/java-1.5.0-ibm-1.5.0.16.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
Comment 1 Omair Majid 2013-07-24 03:09:45 EDT
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:
http://mail.openjdk.java.net/pipermail/jdk8-dev/2013-July/002826.html

Lets see what they have to say.
Comment 2 Andrew John Hughes 2013-07-26 05:07:18 EDT
We've had this filed as an IcedTea bug for a while:

http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1348

Easily fixed.
Comment 3 Omair Majid 2013-08-29 20:53:43 EDT
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:
http://thread.gmane.org/gmane.comp.java.openjdk.jdk8.devel/2360

I would prefer to follow what upstream is doing, if possible.
Comment 4 Omair Majid 2013-10-21 09:20:47 EDT
Upstream is sticking with 'openjdk version...' for now.
Comment 5 jiri vanek 2013-10-21 09:31:46 EDT
also please see - https://bugzilla.redhat.com/show_bug.cgi?id=988394 wea re going to change Java version in jdk8 even more
Comment 6 Fedora Admin XMLRPC Client 2014-02-04 11:21:46 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Fedora End Of Life 2015-01-09 14:04:29 EST
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.
Comment 8 Fedora End Of Life 2015-02-17 11:19:55 EST
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
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.