[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-distro-pkg-dev
Subject:    Need reviewers and comments: 6989472: Provide simple jdk identification information in the install i
From:       kelly.ohair () oracle ! com (Kelly O'Hair)
Date:       2010-11-30 22:56:47
Message-ID: 38353036-D8B6-442D-BF79-8DEFB18BFB32 () oracle ! com
[Download RAW message or body]


On Nov 30, 2010, at 6:13 AM, Mark Wielaard wrote:

> Hi Kelly,
>
> On Mon, 2010-11-29 at 14:44 -0800, Kelly O'Hair wrote:
>> Need reviewers and comments:
>>   6989472: Provide simple jdk identification information in the
>> install image
>>   http://cr.openjdk.java.net/~ohair/openjdk7/jdk_release/webrev/
>
> CCing distro-pkg-dev since we were recently discussing runtime
> identification on irc wrt the various IcedTea supported runtimes
> (hotspot client, server, zero, shark and cacao).
>
>> With JDK6 Updates we purposely resisted many rebranding changes that
>> could impacted
>> customers, however at one point we had accidently changed the Windows
>> DLL/EXE
>> COMPANY value thinking that no one would be looking at it.
>> We were wrong and this change cause Eclipse failures, so we are
>> looking for a solution, see:
>>    https://bugs.eclipse.org/bugs/show_bug.cgi?id=321390
>> So we went back and change JDK6 Updates back the way it was, and
>> learned a valuable lesson.
>>
>> But we have and will change JDK7 in this regard, so we wanted a  
>> better
>> way for an app to
>> know what it had it's hands on without using platform specific
>> information in the binary files.
>>
>> The above change creates a small text file called "jdk.release" at  
>> the
>> top of the install image
>> with some basic values that could help direct any app using the jdk  
>> in
>> constructing a command
>> line or even being assured that this jdk install image will even work
>> on your existing system.
>> In the Eclipse case it was looking for "Sun", but I suspect it really
>> wanted to know if the VM was
>> "Hotspot" because I think it was trying to set a Hotspot specific
>> PermGen option.
>
> If so, then I would leave out the confusing vendor strings from the
> jdk.release file. Because that isn't what people want to know. And  
> might
> reintroduce the confusion. The os, arch, version of class library and
> runtime is what is selected on. Maybe this should be extended with the
> versions of jaxp, jaxws, corba and langtools that are included.

Ouch. jaxp? jaxws...  Seems like a bigger hole than I wanted to dig. :^(

I could see skipping the vendor ones, since Eclipse even wasn't really  
after "Sun"
as much as 'Is this hotspot?'.

The questions I wanted to answer, without actually running the jdk  
image was:
   Is this hotspot?
   What basic OS is this for? e.g. Windows, Linux, Solaris
   What minimal OS version is needed? e.g. Linux 2.6, SunOS 5.10,  
Windows 5.1, etc.
   What minimal arch is supported? e.g. x86, or sparc, or x64 (no x86  
ability), ppc, etc.
   What jdk release is this? e.g. 1.7.0

I could probably also skip the VM version.

>
>> In any case I think this jdk.release file should provide the  
>> necessary
>> answers in the future.
>
> But I don't think this is specific enough yet. Hotspot comes in some
> variants (at least server and client), which might or might not be
> available on the platform. You can know which ones if you look at the
> jre/lib/<arch>/jvm.cfg file. [IcedTea then extends this with shark,
> zero, cacao as alternatives]. The problem with that approach is that  
> to
> get at this file you need to know the arch mapping/dir in use. Would  
> it
> be possible to somehow merge or at least reference the jvm.cfg file
> with/in the jdk.release file?

Ah... that might be interesting...
If I provided the relative path to the jvm.cfg file, then I suppose  
the question of
"Is it hotspot?" could be done looking into that file.
I assume the similar questions of "Is it jrockit?" or "Is it j9?"  
could also be answered?

In general, I was assuming a hotspot VM was a hotspot VM, server or  
client wasn't
of interest as much as what specific VM implementation it was.

-kto

>
>> The make variable COMPANY_NAME determines the vendor name during a
>> build,
>> so a Linux 64bit build from a make command line like:
>>    make COMPANY_NAME="Test Company Name"
>> should result in a jdk.release file that looks something like:
>>
>> os.name = Linux
>> os.version = 2.6
>> os.arch = amd64
>> java.vendor = Test Company Name
>> java.version = 1.7.0-internal
>> java.vm.vendor = Test Company Name
>> java.vm.name = Hotspot(TM)
>> java.vm.version = 20.0-b02
>>
>> A formal Oracle jdk7 EA build on Linux 64bit should look something  
>> like:
>>
>> os.name = Linux
>> os.version = 2.6
>> os.arch = amd64
>> java.vendor = Oracle Corporation
>> java.version = 1.7.0-ea
>> java.vm.vendor = Oracle Corporation
>> java.vm.name = Hotspot(TM)
>> java.vm.version = 20.0-b02
>>
>> Comments are welcome. Although, polite constructive comments are
>> probably more what I'd like to see. ;^)
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic