Just found another, quite obscure thing that can prevent your application from showing up in JVisualVM under Windows:
JVisualVM uses your system's temp-folder (as specified by the environment variable TMP
) to communicate with running applications. For security reasons, if this folder is not located on an NTFS partition where Windows can provide strict file access controls, debugging is disabled and applications won't show up in JVisualVM.
If reformatting that partition or moving your entire temp-folder is not something you want or can do, you can simply create a secondary temp-folder just for JVisualVM on an NTFS partition somewhere else and set your launch configurations in Eclipse to set the environment variable TMP
to that folder. Then, simply use the following batch file to run JVisualVM and everything should work:
@Echo off
set TMP=F:\temp
start "JVisualVM" /b "C:\Program Files\Java\jdk1.7.0_76\bin\jvisualvm"
Here, you need to replace F:\temp
with the location of your new temp-folder just like specified in the launch configurations and C:\Program Files\Java\jdk1.7.0_76
with your JDK install directory.