RFR (S) JDK-8025700: RuntimeMXBean.getInputArguments() should include -server/-client/-d32/-d64
Mandy Chung
mandy.chung at oracle.com
Thu Oct 10 00:45:02 PDT 2013
On 10/9/2013 11:53 AM, Staffan Larsen wrote:
> I can absolutely see where Aleksey (and 99% of the Java users) is coming from. From a user perspective there is no difference between the launcher arguments and the JVM arguments. Unfortunately the implementation does make a difference between them and it's not easy to hide this difference.
>
> A similar problem is that the actual main-class is not known by the JVM. We work around this with the sun.java.command property, but when a custom launcher is used that property is not set and so we lack information about this in the JVM (and in the management APIs). The typical example of this for me is running eclipse.
I also think that this is a good enhancement to obtain the information
required to relaunch the VM besides JVM arguments as well as the entry
point. BTW main-class is one kind of entry point and it would be useful
to monitoring the entry point for use by other agents.
> Perhaps we could extend the JNI invocation API to allow these things to be passed through?
That's probably the appropriate API to take additional non-VM
information to pass through.
> A problem is of course to define what a "launcher argument" is. For example, sometimes Java is launched from inside another application (web browser, anyone?) and then the arguments to that host process makes little sense to pass on.
Maybe just not to define what the value to the VM is - simply some
String passed from the one who creates the VM and publish that via a
supported API.
Mandy
> Regards,
> /Staffan
>
> On 9 okt 2013, at 11:21, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
>
>> On 10/09/2013 01:03 PM, Mandy Chung wrote:
>>>> Do you see any better option?
>>> I no longer work in this area and don't have any suggestion at the
>>> moment. Although parsing of VM name is not ideal, I suggest it as a
>>> workaround for now and give the serviceability team time to look into
>>> this to address your request.
>> Ok, I'll leave the ticket open meanwhile.
>>
>> Thanks,
>> -Aleksey.
>>
More information about the serviceability-dev
mailing list