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: [vmi] showing help text
Date Tue, 19 Sep 2006 16:24:46 GMT
Geir Magnusson Jr. wrote:
> On Sep 19, 2006, at 11:02 AM, Tim Ellison wrote:
>> Geir Magnusson Jr. wrote:
<snip>
>>> I'm going to modify the launcher to pass "-help" into the VM when it's
>>> been named "java*" so that it behaves like the tools that come with the
>>> Sun's, BEA's and IBM's impelmentation.
>>
>> As I mentioned before, you if you pass "-help" or "-showversion" in the
>> creation of the IBM or Sun VM you will get an error, e.g.:
>>
>>   C:\temp\sample>test
>>   JVMJ9VM007E Command-line option unrecognised: -help
>>   Failed to create VM with rc=-6.
>>
>> These command-line flags are handled by the launcher (not the VM).
> 
> I need to test that for Sun via a launcher, as just doing "java -help"
> w/ the sun JRE works as expected - it prints help.

Sun's VM (1.5.0_06) does the same thing:
  C:\temp\sample>test
  Unrecognized option: -help
  Failed to create VM with rc=-1.

BTW I'm using the test program I posted here, but passing in "-help":
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200609.mbox/%3c45092A90.8010709@gmail.com%3e

>> Since in Harmony there is not a 1:1 correlation of launcher to VM
>> implementation you will have to either print out generic help in the
>> launcher (bad) or go for an extension to the VM interface to get/print
>> help text.
> 
> How about passing -help to the VM?  I don't grok the downside to this. 
> DRLVM works this way now.   that way any localization issues are up to
> the VM provider.

I'm just pointing out that not all VMs will grok that option, so the
launcher should not assume they will.

We can add a requirement to the VMI that VMs can answer/print their help
text, but right now we have no such thing.  Existing VMs will fail to
initialize (unless you set ignoreUnrecognized, in which case you won't
get help text of course).

> Having the launcher print out help based on the executable name would be
> bad - it has to be some thing else.

I don't see that we could do that anyway, since the launcher is always
java.exe, and different VMs will have different help text.

Regards,
Tim

>> I believe that you could write a useful generic implementation of
>> version info since VMs put that into system properties.
> 
> True - we could solve the version problem that way...
> 
> geir
> 
>>
>> Regards,
>> Tim
>>
>>> IOW, I think that users expect :
>>>
>>> ./java
>>>
>>> ..... print help here....
>>>
>>>
>>> But we do need to hunt down why it exits so ungracefully - this is a
>>> good test case showing problems since it's so simple.
>>>
>>> geir
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>
>>
>> -- 
>> 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
>>
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 

-- 

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


Mime
View raw message