harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov" <alexey.v.varla...@gmail.com>
Subject Re: [drlvm] Illegal command line options
Date Thu, 15 Feb 2007 17:39:50 GMT
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 <oliver.deakin@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
>
>

Mime
View raw message