java -version output for JDK8

Kumar Srinivasan kumar.x.srinivasan at oracle.com
Thu Jul 25 11:00:41 PDT 2013


On 7/25/2013 10:10 AM, Omair Majid wrote:
> On 07/25/2013 01:03 PM, Kumar Srinivasan wrote:
>> On 7/24/2013 11:13 PM, David Holmes wrote:
>>> On 24/07/2013 5:05 PM, Omair Majid wrote:
>>>> Hi,
>>>>
>>>> It was just brought to my attention that the output of java -version is
>>>> different on builds of jdk8 when compared to jdk7 [1]:
>>>>
>>>> # 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)
>>>>
>>>> OpenJDK 7 identifies itself as "java version...." while OpenJDK 8
>>>> identifies itself as "openjdk version...". Is this intentional? Will
>>>> this be changed after Java 8 is finalized?
>>> It comes from  common/autoconf/version-numbers which has:
>>>
>>> LAUNCHER_NAME=openjdk
>>>
>>> which seems to be a mistake to me as obviously the launcher name is
>>> not openjdk.
>> This was introduced to differentiate between an openjdk build vs. Oracle's
>> jdk build (with closed). There used to be some make magic which deciphers
>> what to set.
> I thought all Java versions claimed "java version #.#.#_#", including
> those from other proprietary vendors.
>
> Also, the lines after "java version" make OpenJDK explicit, no? Is this
> second line not sufficient to distinguish OpenJDK vs closed builds?
>
> # java -version
> java version "1.7.0_25"
> OpenJDK Runtime Environment (fedora-2.3.10.3.fc19-ppc64)  <--- this line
> OpenJDK 64-Bit Zero VM (build 23.7-b01, interpreted mode)

we needed to account for java -fullversion as well, which btw. is a one 
liner.
It was decided the OpenJDK launcher name to be openjdk as well, there
were discussions of course surounding this, but I can't remember.

Kumar
>
> Thanks,
> Omair
>



More information about the jdk8-dev mailing list