> I try to display in my application the options of the jvm. To verify
> and eventually adapt the process.
>> I try to display in my application the options of the jvm. To verify
>> and eventually adapt the process.
>
> As far as I know, that is not possible. I would /love/ to be proved wrong...
Well, jinfo shows the information. So you could either duplicate parts
of jinfo (which presumably connects to a
debugging/performance/monitoring & management interface) or do something
platform specific, such as run /bin/ps.
But generally you can't change these things at runtime.
Tom Hawtin
Piotr Kobzda - 07 Mar 2007 08:19 GMT
>>> I try to display in my application the options of the jvm. To verify
>>> and eventually adapt the process.
[quoted text clipped - 6 lines]
> debugging/performance/monitoring & management interface) or do something
> platform specific, such as run /bin/ps.
jinfo is /presumably/ using that:
<http://java.sun.com/javase/6/docs/api/java/lang/management/RuntimeMXBean.html#ge
tInputArguments()>
For current JVM, it's one line of code to have that info:
ManagementFactory.getRuntimeMXBean().getInputArguments()
piotr
Chris Uppal - 07 Mar 2007 12:46 GMT
> ManagementFactory.getRuntimeMXBean().getInputArguments()
Nice!
-- chris