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 local machine. Most are listed as " (pid xxxx)" but some have a name and an icon, like VisualVM itself and others like NetBeans (see the screenshot in this dzone article for example).
How do I inject my application name and icon into the JVM so it shows up properly in VisualVM's application list? Does my app need to be running JRE 1.6 or can I do this under 1.5 too?