harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][launcher]shall we handle the parameter -version and -showversion in launcher or vm?
Date Fri, 13 Oct 2006 22:04:28 GMT
Alexey Varlamov wrote:
> [snip]
>> > > What are you concerned about wasting?  It will take longer for
>> sure, but
>> > >  'java -version' doesn't need to be super fast (it prints to the
>> console
>> > > and quits).  In addition, we should consider gathering version
>> > > information from the class library code too, i.e. to show each module
>> > > version.  I don't think it warrants extending the VMI.
> I suppose modules={vm, classlib} here? That is quite reasonable; there
> are specific properties documented in API docs:
> "java.version"         Java Runtime Environment version
> "java.vm.version"    Java Virtual Machine implementation version
> RI additionally provides undocumented "java.runtime.version", with
> value usually equal to java.vm.version

Right, so I would expect the launcher to print out a reasonable summary
of the VM and class library version information.  We will particularly
require both (VM & classlib) in Harmony because it is so easy to run
with different VMs.

he brief version info may be the spec version number (1.5) and the svn
build info from classlib, plus whatever the VM chooses to report.

We might also consider a -version:verbose or whatever which prints out
the version info from each module in classlib.  That will help show
which version of, say Yoko or Logging is being used.  We can write a
simple class in Java to print that for us.

> [snip]
>>   If we have decided not to transfer version as an option into vm, we can
>> make some change in launcher:
>>   1.When create vm, "-version" is not included as part of vm argument,
>> thus
>> our vm will not report error.
>>   2.When vm created, we uses a JNI call to
>> System.getProperty("java.version")
>> or VMI funciton GetSystemProperty("java.version")to show it to user. I am
>> not sure which way is better.
> VMI is preferable - with the same functionality, it is still faster :)

I don't care about it being fast.



Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message