You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Vladimir Beliaev <vl...@gmail.com> on 2007/06/20 11:31:25 UTC
[generic][launcher] help for drlvm specific properties
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
Re: [generic][launcher] help for drlvm specific properties
Posted by Vladimir Beliaev <vl...@gmail.com>.
> DRLVM does not print anything - launcher does not pass -X to DLRVM.
Out of date information - Euege Ostrovsky has fixed this already :)
Ok, looks like WEB page & URL from 'java -X' is a solution. Let's follow
this one.
Thanks for you feedback.
Vladimir Beliaev
2007/6/20, Pavel Pervov <pm...@gmail.com>:
>
> Why adding URL to -X? Help on -X should be printed with 'java -X'. BTW,
> DRLVM does not print anything - launcher does not pass -X to DLRVM.
>
> Pavel.
>
> P.S. BTW, what I've proposed will solve this issue.
>
> On 6/20/07, Gregory Shimansky <gs...@apache.org> wrote:
> >
> > 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 <vl...@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
> >
> >
>
>
> --
> Pavel Pervov,
> Intel Enterprise Solutions Software Division
>
Re: [generic][launcher] help for drlvm specific properties
Posted by Vladimir Beliaev <vl...@gmail.com>.
The static html page is created by Nadia Morozova for DRLVM command line
properties help:
http://harmony.apache.org/cmd_options.html
Please note again that I keep a related Wiki page, accumulate the rest of
properties updates on it, then Nadia will update mentioned html page &
remove the Wiki one.
Thanks
Vladimir Beliaev
2007/6/21, Tim Ellison <t....@gmail.com>:
>
> Vladimir Beliaev wrote:
> > Tim, do you mean it is better to replace Wiki page with a static html
> one
>
> Yes
>
> > (to avoid duplicating documents)?
>
> Well the wiki allows anyone to modify it, and we probably don't want
> that for documentation being referenced directly by our runtime.
>
> > I think meanwhile I'll collect all input in Wiki page & then get it
> > converted to html... You right - there are a set of out-of-date
> information
> > already which requires double checking...
>
> That would be great, thanks Vladimir.
>
> Regards,
> Tim
>
Re: [generic][launcher] help for drlvm specific properties
Posted by Tim Ellison <t....@gmail.com>.
Vladimir Beliaev wrote:
> Tim, do you mean it is better to replace Wiki page with a static html one
Yes
> (to avoid duplicating documents)?
Well the wiki allows anyone to modify it, and we probably don't want
that for documentation being referenced directly by our runtime.
> I think meanwhile I'll collect all input in Wiki page & then get it
> converted to html... You right - there are a set of out-of-date information
> already which requires double checking...
That would be great, thanks Vladimir.
Regards,
Tim
Re: [generic][launcher] help for drlvm specific properties
Posted by Vladimir Beliaev <vl...@gmail.com>.
Tim, do you mean it is better to replace Wiki page with a static html one
(to avoid duplicating documents)?
I think meanwhile I'll collect all input in Wiki page & then get it
converted to html... You right - there are a set of out-of-date information
already which requires double checking...
Thanks
Vladimir
2007/6/20, Tim Ellison <t....@gmail.com>:
>
> Vladimir Beliaev wrote:
> > I was looking for the proper place to put the DRLVM properties
> description
> > and...
> >
> > http://wiki.apache.org/harmony/DrlvmCommandLineOptions
> >
> > (sorry I missed it from very beginning...)
> >
> > I'll prepare a patch for giving URL to this page from '-X' output, then
> > HARMONY-3409 may be resloved, then I'll work on this Wiki Page updating
> > (which will require a time)...
>
> If the URL is being hard-coded into the JVM, then it should point to the
> website (so it is under SVN control and not editable by people beyond
> the project), and should include a build identifier, so the info is
> correct for the version of JVM you are running.
>
> Regards,
> Tim
>
>
--
Vladimir Beliaev
Intel Middleware Products Division
Re: [generic][launcher] help for drlvm specific properties
Posted by Tim Ellison <t....@gmail.com>.
Vladimir Beliaev wrote:
> I was looking for the proper place to put the DRLVM properties description
> and...
>
> http://wiki.apache.org/harmony/DrlvmCommandLineOptions
>
> (sorry I missed it from very beginning...)
>
> I'll prepare a patch for giving URL to this page from '-X' output, then
> HARMONY-3409 may be resloved, then I'll work on this Wiki Page updating
> (which will require a time)...
If the URL is being hard-coded into the JVM, then it should point to the
website (so it is under SVN control and not editable by people beyond
the project), and should include a build identifier, so the info is
correct for the version of JVM you are running.
Regards,
Tim
Re: [generic][launcher] help for drlvm specific properties
Posted by Vladimir Beliaev <vl...@gmail.com>.
I was looking for the proper place to put the DRLVM properties description
and...
http://wiki.apache.org/harmony/DrlvmCommandLineOptions
(sorry I missed it from very beginning...)
I'll prepare a patch for giving URL to this page from '-X' output, then
HARMONY-3409 may be resloved, then I'll work on this Wiki Page updating
(which will require a time)...
Thanks
Vladimir
2007/6/20, Gregory Shimansky <gs...@apache.org>:
>
> Pavel Pervov wrote:
> > Why adding URL to -X? Help on -X should be printed with 'java -X'. BTW,
> > DRLVM does not print anything - launcher does not pass -X to DLRVM.
>
> Just as a reference to more VM internal related stuff since -X already
> prints VM specific options. I don't insist on putting an URL into -X
> help, just think it to be logical.
>
> > P.S. BTW, what I've proposed will solve this issue.
> >
> > On 6/20/07, Gregory Shimansky <gs...@apache.org> wrote:
> >>
> >> 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 <vl...@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
> >>
> >>
> >
> >
>
>
> --
> Gregory
>
>
--
Vladimir Beliaev
Intel Middleware Products Division
Re: [generic][launcher] help for drlvm specific properties
Posted by Gregory Shimansky <gs...@apache.org>.
Pavel Pervov wrote:
> Why adding URL to -X? Help on -X should be printed with 'java -X'. BTW,
> DRLVM does not print anything - launcher does not pass -X to DLRVM.
Just as a reference to more VM internal related stuff since -X already
prints VM specific options. I don't insist on putting an URL into -X
help, just think it to be logical.
> P.S. BTW, what I've proposed will solve this issue.
>
> On 6/20/07, Gregory Shimansky <gs...@apache.org> wrote:
>>
>> 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 <vl...@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
>>
>>
>
>
--
Gregory
Re: [generic][launcher] help for drlvm specific properties
Posted by Pavel Pervov <pm...@gmail.com>.
Why adding URL to -X? Help on -X should be printed with 'java -X'. BTW,
DRLVM does not print anything - launcher does not pass -X to DLRVM.
Pavel.
P.S. BTW, what I've proposed will solve this issue.
On 6/20/07, Gregory Shimansky <gs...@apache.org> wrote:
>
> 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 <vl...@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
>
>
--
Pavel Pervov,
Intel Enterprise Solutions Software Division
Re: [generic][launcher] help for drlvm specific properties
Posted by Gregory Shimansky <gs...@apache.org>.
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 <vl...@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
Re: [generic][launcher] help for drlvm specific properties
Posted by Pavel Pervov <pm...@gmail.com>.
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.
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 <vl...@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
>
--
Pavel Pervov,
Intel Enterprise Solutions Software Division