Weird - this showed up this morning on my machine.  Sorry about delay.

On Sep 20, 2006, at 7:39 AM, Tim Ellison wrote:

I think we are agreeing, but have (at least) two things muddled up, so
let me try and clarify:

1) Users want VM-specific help text when they use the Harmony launcher
and run "java -help".

2) Users want tool-specific help when they use the tools launcher, e.g.
"javac -help".

Yes - which is the same problem, IMO - users want specific help for whatever "program" they are running (java, javac, javah, javap)


Dealing with them in reverse order...

For (2) the tools launcher passes command-line args to the tools code,
so javac -help will be translated into something like:
  java -cp tools.jar o.a.h.tools.javac.Main -help

yep


It is the tool code itself that gets the help flag and shows help text.
 Incidentally, this is how the launcher works today (but see footnote
below).

For case (1) above, the launcher will have to ask the VM to print its
help text, based on whichever VM is being invoked.  This is a new
requirement for Harmony-compatible VMs that will require a change to the
VM interface.  I'm not saying that is bad, and we can debate how to
provide it (i.e. is it a VMI function call or an extension to the
JNI_CreateJavaVM functionality, etc.)

I guess I don't grok why we need a change to the VM interface. Why not just pass it through as a VM arg like we do now (for DRLVM anyway) in the same way we pass -X<whatever> ?


Was there anything I missed?

Footnote : I suggest that we extract the tools-based code in the current
launcher, and make the tools launcher a simpler program that re-writes
the command-line and exec()'s the generic launcher.  Putting these two
cases into the same source file only confuses things.  (yes I know it
was me that did that<g>)

Hm.  Interesting idea.  I actually don't mind it as is though.

geir


Regards,
Tim


Geir Magnusson Jr. wrote:

On Sep 19, 2006, at 12:24 PM, Tim Ellison wrote:

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/[EMAIL PROTECTED]


Why would one even want to launch Sun this way?  I mean, I figure the
lack of support of our classlibrary would be a bigger obstacle to use
than simply not supporting "-help"


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.


Agreed. But our launcher is for Harmony, and there are already a bunch
of pre-reqs...

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

I'm still confused. When you say "existing VMs". you mean J9? Because
besides DRLVM, there are no others that work w/ the launcher...


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.

Right.

What I mean is some scheme where we base help text on exe name, like
"javac" "java" "javah" etc...

So to try to drive this to conclusion, I don't get it - what would be
wrong with adding "supports all options passed through the launcher
except vmdir: and vm:" to our list of things that a harmony- supporting
VM does?

geir


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- [EMAIL PROTECTED] For additional commands, e-mail: harmony-dev- [EMAIL PROTECTED]



--Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

------------------------------------------------------------------ ---
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev- [EMAIL PROTECTED] For additional commands, e-mail: harmony-dev- [EMAIL PROTECTED]



------------------------------------------------------------------- --
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev- [EMAIL PROTECTED] For additional commands, e-mail: harmony-dev- [EMAIL PROTECTED]



--
Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-------------------------------------------------------------------- -
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- [EMAIL PROTECTED]



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: harmony-dev- [EMAIL PROTECTED]



--

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to