You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Sean Qiu <se...@gmail.com> on 2007/03/05 09:08:25 UTC

Re: [drlvm] Illegal command line options

I have been trying to run the eclipse's tests with harmony's classlib
recently.
There are some tests will pass the string "-verify" to create a new VM.
For the reason mentioned by Oliver, all these tests failed because our
launcher pass it directly to vm.
It seems that the option "-verify" is widespread.

So, i suggest to handle this specificly for -verify in our launcher.

2007/2/16, Alexey Varlamov <al...@gmail.com>:
>
> You are right, I'm reading the same in the spec ... and this appears
> to be a problem.
> There is a number of standard options actualy:
> -client/-server, -agentlib/-agentpath, -ea/-da/-esa/-dsa/, -help,
> -version/-showversion etc
> Should the launcher recognize&convert all of them? Looks somewhat
> cumbersome...
> Maybe just prefix any unrecognized with __(double underscore), like
> -verify to __-verify.
> Just easier for VM to trim such prefix and parse as standard arg :)
>
> --
> Alexey
>
> 2007/2/15, Oliver Deakin <ol...@googlemail.com>:
> > It has come to my attention recently that DRLVM accepts the -verify
> > option when it is passed in through the invocation API. This actually
> > breaks the JNI spec rules outlined at:
> >
> >
> http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html#wp16334
> >
> > These rules are actually quite tight - if I read it correctly, it
> > appears that they do *not* allow the VM to interpret "-version" as an
> > option, and if you write a simple launcher that tries to pass -version
> > to the RI via CreateJavaVM you get an error:
> >
> >  Unrecognized option: -version
> >  Cannot create JavaVM
> >
> > The spec seems fairly clear that we should not respect these options if
> > they are passed through, but we can accept X prefixed versions of them.
> > This would require the launcher to convert these options from e.g.
> > -verify to -Xverify before passing them into the VM.
> >
> > Thoughts?
> >
> > Regards,
> > Oliver
> >
> > --
> > Oliver Deakin
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> 3AU
> >
> >
>



-- 
Sean Qiu

Re: [drlvm] Illegal command line options

Posted by Sean Qiu <se...@gmail.com>.
2007/3/5, Yang Paulex <pa...@gmail.com>:
>
> 2007/3/5, Sean Qiu <se...@gmail.com>:
> >
> > I have been trying to run the eclipse's tests with harmony's classlib
> > recently.
>
>
> DRLVM or IBM VME?



DRLVM can handle the "-verify" option, while IBM VME will fail.

There are some tests will pass the string "-verify" to create a new VM.
> > For the reason mentioned by Oliver, all these tests failed because our
> > launcher pass it directly to vm.
> > It seems that the option "-verify" is widespread.
> >
> > So, i suggest to handle this specificly for -verify in our launcher.
>
>
> If this incompatibility break applications like Eclipse, I think we have
> no
> choice but to be compatible, and I agree that this case should be fixed in
>
> launcher, because if one Harmony compatible VM complies with RI and spec
> on
> this -verify option, Harmony launcher should not break it.
>
> Would you please raise a jira on this? I'd like to look at it.


Of course, i have report it in
 https://issues.apache.org/jira/browse/HARMONY-3293

2007/2/16, Alexey Varlamov <al...@gmail.com>:
> > >
> > > You are right, I'm reading the same in the spec ... and this appears
> > > to be a problem.
> > > There is a number of standard options actualy:
> > > -client/-server, -agentlib/-agentpath, -ea/-da/-esa/-dsa/, -help,
> > > -version/-showversion etc
> > > Should the launcher recognize&convert all of them? Looks somewhat
> > > cumbersome...
> > > Maybe just prefix any unrecognized with __(double underscore), like
> > > -verify to __-verify.
> > > Just easier for VM to trim such prefix and parse as standard arg :)
> > >
> > > --
> > > Alexey
> > >
> > > 2007/2/15, Oliver Deakin <ol...@googlemail.com>:
> > > > It has come to my attention recently that DRLVM accepts the -verify
> > > > option when it is passed in through the invocation API. This
> actually
> > > > breaks the JNI spec rules outlined at:
> > > >
> > > >
> > >
> > http://java.sun.com/j2se/1.5.0
> /docs/guide/jni/spec/invocation.html#wp16334
> > > >
> > > > These rules are actually quite tight - if I read it correctly, it
> > > > appears that they do *not* allow the VM to interpret "-version" as
> an
> > > > option, and if you write a simple launcher that tries to pass
> -version
> > > > to the RI via CreateJavaVM you get an error:
> > > >
> > > >  Unrecognized option: -version
> > > >  Cannot create JavaVM
> > > >
> > > > The spec seems fairly clear that we should not respect these options
> > if
> > > > they are passed through, but we can accept X prefixed versions of
> > them.
> > > > This would require the launcher to convert these options from e.g.
> > > > -verify to -Xverify before passing them into the VM.
> > > >
> > > > Thoughts?
> > > >
> > > > Regards,
> > > > Oliver
> > > >
> > > > --
> > > > Oliver Deakin
> > > > Unless stated otherwise above:
> > > > IBM United Kingdom Limited - Registered in England and Wales with
> > number
> > > 741598.
> > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
> PO6
> > > 3AU
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Sean Qiu
> >
>
>
>
> --
> Paulex Yang
> China Software Development laboratory
> IBM
>



-- 
Sean Qiu

Re: [drlvm] Illegal command line options

Posted by Yang Paulex <pa...@gmail.com>.
2007/3/5, Sean Qiu <se...@gmail.com>:
>
> I have been trying to run the eclipse's tests with harmony's classlib
> recently.


DRLVM or IBM VME?

There are some tests will pass the string "-verify" to create a new VM.
> For the reason mentioned by Oliver, all these tests failed because our
> launcher pass it directly to vm.
> It seems that the option "-verify" is widespread.
>
> So, i suggest to handle this specificly for -verify in our launcher.


If this incompatibility break applications like Eclipse, I think we have no
choice but to be compatible, and I agree that this case should be fixed in
launcher, because if one Harmony compatible VM complies with RI and spec on
this -verify option, Harmony launcher should not break it.

Would you please raise a jira on this? I'd like to look at it.

2007/2/16, Alexey Varlamov <al...@gmail.com>:
> >
> > You are right, I'm reading the same in the spec ... and this appears
> > to be a problem.
> > There is a number of standard options actualy:
> > -client/-server, -agentlib/-agentpath, -ea/-da/-esa/-dsa/, -help,
> > -version/-showversion etc
> > Should the launcher recognize&convert all of them? Looks somewhat
> > cumbersome...
> > Maybe just prefix any unrecognized with __(double underscore), like
> > -verify to __-verify.
> > Just easier for VM to trim such prefix and parse as standard arg :)
> >
> > --
> > Alexey
> >
> > 2007/2/15, Oliver Deakin <ol...@googlemail.com>:
> > > It has come to my attention recently that DRLVM accepts the -verify
> > > option when it is passed in through the invocation API. This actually
> > > breaks the JNI spec rules outlined at:
> > >
> > >
> >
> http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html#wp16334
> > >
> > > These rules are actually quite tight - if I read it correctly, it
> > > appears that they do *not* allow the VM to interpret "-version" as an
> > > option, and if you write a simple launcher that tries to pass -version
> > > to the RI via CreateJavaVM you get an error:
> > >
> > >  Unrecognized option: -version
> > >  Cannot create JavaVM
> > >
> > > The spec seems fairly clear that we should not respect these options
> if
> > > they are passed through, but we can accept X prefixed versions of
> them.
> > > This would require the launcher to convert these options from e.g.
> > > -verify to -Xverify before passing them into the VM.
> > >
> > > Thoughts?
> > >
> > > Regards,
> > > Oliver
> > >
> > > --
> > > Oliver Deakin
> > > Unless stated otherwise above:
> > > IBM United Kingdom Limited - Registered in England and Wales with
> number
> > 741598.
> > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
> > 3AU
> > >
> > >
> >
>
>
>
> --
> Sean Qiu
>



-- 
Paulex Yang
China Software Development laboratory
IBM