harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@apache.org>
Subject Re: [generic][launcher] help for drlvm specific properties
Date Wed, 20 Jun 2007 12:14:42 GMT
Pavel Pervov wrote:
> Vladimir,
> 
> 'java -X' usually prints out help on options, which start with -X.
> 
> What you was asking about as I understood that has syntax of
> -XX:<vm_option>[=<value>]. Sun's VM has help on these options on the Web
> page and no means to print it out to console.
> 
> So, I'm -1 here for printing help on -XX options.

I agree that it is better to provide help on DRLVM internal properties 
on web site instead of printing it to console. We can also have a man 
page in the future which would include that text too.

Adding an URL to help on -X is a good idea.

> If community still decide to print such help - there is 4-th way to do so
> (which will require changing.launcher).
> 1) launcher recognizes several generic options and is able to determine
> application class or jar name.
> 2) if no -vmdir or -vmdll is specified on command line - launcher tries to
> load that VM, otherwise defaults to <launcher location>/default/harmonyvm
> and tryies to load this one. If it fails - it prints short help message as
> it does right now, when launched with some unrecognizable property name.
> 3) if library is loaded successfully - launcher constructs arguments array
> (as it does right now) and calls to JNI_CreateJavaVM from loaded VM 
> library.
> 4) if this call returns (-?, -h, -help and -X do not return from
> JNI_CreateJavaVM) and if launcher finds class of jar name on the command
> line - it proceeds with program startup.
> 
> What do you think on such generic startup sequence?
> 
> WBR,
>    Pavel.
> 
> On 6/20/07, Vladimir Beliaev <vladimir.k.beliaev@gmail.com> wrote:
>>
>> Hello, All
>>
>> I want to add a *help *for drlvm specific system properties like '-
>> Xvm.assert_dialog=false' (as asked in
>> HARMONY-3409<http://issues.apache.org/jira/browse/HARMONY-3409>
>> ).
>>
>> *Could you send your opinion on what way this can be done?* There are
>> three
>> safe ways to do this & non of them seems to be really good (please see
>> technical details in
>> HARMONY-3409<http://issues.apache.org/jira/browse/HARMONY-3409>).
>>
>>
>> *way 1*: support 'java -Xhelp:prop foo' command line... Like if one runs
>> 'java -X' then this help says "run '-Xhelp:prop foo' to see sytem
>> properties"... In short: if one does not specify this 'foo' at the end,
>> then
>> a generic launcher consider command line as broken (no 'mainClass' is
>> specified) & does not invoke JNI_CreateJavaVM (which print a help)...
>>
>> *way 2*: support 'java -Xhelp:prop' command line (i.e. w/o dummy 
>> 'foo')...
>> To implement this the *generic* launcher is to be changed to recognize
>> '-Xhelp:' as a 'help' option (like it recognizes ? -h -help -X now).
>> Because
>> of other VMs do not support such a '-Xhelp:' option we get
>> *generic*launcher to be a bit drlvm-specific...
>>
>> *way 3*: be like other VMs and do not print a 'help for drlvm internal
>> properties'. Instead, 'java -X' help output may provide a URL to
>> harmony.apache.org html document explaining drlvm internal system
>> properties...
>>
>> I would pick a *way 1* as it does not change *generic *launcher & we are
>> free to do every thing we want with -X... I do not like *way 3* at all -
>> it
>> is not a big deal to create such a document, still it is one more 
>> document
>> to be supported (I believe it may become out-of-date pretty in couple
>> months)...
>>
>> So, what do you think?
>>
>> -- 
>> Thanks
>> Vladimir Beliaev
>> Intel Middleware Products Division
>>
> 
> 
> 


-- 
Gregory


Mime
View raw message