harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [j9] Doesn't deal with -showversion
Date Thu, 14 Sep 2006 21:47:16 GMT
On Thursday 14 September 2006 17:48 Oliver Deakin wrote:
> Tim Ellison wrote:
> > Geir Magnusson Jr. wrote:
> >> Oliver and Co :
> >>
> >> I don't know if you caught this in another thread, but I recently
> >> changed the launcher to pass the "-showversion" cmd line param through
> >> to the VM after the launcher prints out its version, so that we can also
> >> know the version of the VM.
> >>
> >> The problem with this brilliant strategy is that J9 doesn't actually
> >> deal with -showversion.
> >>
> >> Can you add that to the list of things to tweak?  Either silently
> >> swallow it, or print something useful would be my suggestion...
> >>
> >> geir
> >
> > Hmm, I'm not convinced that you can expect each VM to respond to
> > -showversion, we may have to continue to handle that in the launcher.
> >
> > Certainly another VM in popular usage (Sun 5.0) doesn't recognise it
> > based on my test code below.
> >
> > We hacked the harmony launcher code to do the brain-dead thing of
> > printing out the launcher version, but I agree that it should print more
> > useful info like the VM + classlib versions.
> >
> > A reasonable way to get the VM version info would be to create the VM
> > then print the 'java.vm.version' property value.
>
> Agreed, this sounds like a reasonable alternative to printing version
> information
> from the launcher, or expecting all Harmony compatable VMs to accept
> -showversion/-version.
>
> Can I suggest a start sequence similar to the following:
> 1) If no options or classes are specified, print help and exit
> 2) If -version, create VM (without -version option) and print
> java.vm.version property. Exit.
> 3) If -showversion, create VM (without -showversion option) and print
> java.vm.version. Go to 5.
> 4) If neither -version nor -showversion are specified, create VM with
> specified options. Go to 5.
> 5) If VM creation returns successfully, check if a main class has been
> specified. If not, print help
> information, destroy the VM and exit (we currently do not print help at
> this point).
> 6) If a class has been specified, launch main().
>
> Does that sound right?

The "-help" and especially "-X" help contents may actually depend on the 
invoked VM as well. So maybe it makes sense to move their text into property 
as well, or how would the launcher know what to print in help for VM 
specific "-X" options help? BTW for RI when "-help" or "-X" are specified it 
doesn't matter if main class was specified, it just prints help and exits.

This is not about non-harmony VMs. It is about specifics about different 
harmony VMs.

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
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


Mime
View raw message