How do I give a name to a VisualVM “”?

前端 未结 1 1890
栀梦
栀梦 2021-02-05 06:41

JDK 1.6 comes bundled with a handy tool called VisualVM that lets you inspect and interact with running Java processes. One feature is that it auto-detects running JVMs on the

相关标签:
1条回答
  • 2021-02-05 07:14

    I solved half of my own question via a NetBeans forum post answer. Adding a JVM command line arg of -Dvisualvm.display.name=FooBar makes VisualVM show the app as "FooBar". But I still can't figure out how to affect the icon.

    UPDATE: Alas, I think I found my answer for the icon. The icons are hard-coded into VisualVM via MainClassApplicationTypeFactory in the VisualVM source, invoked from the static method ApplicationTypeFactory.getApplicationTypeFor(Application). I can't see any way to inject a new icon into VisualVM except by making a VisualVM plugin which could register a new type factory -- the Glassfish plugin does this via GlassFishApplicationTypeFactory.initialize() for example.

    0 讨论(0)
提交回复
热议问题