JConsole is a great tool to monitor Java applications using JMX. One common issue that can happen, is that when you start JConsole, you don’t see any process in the “Local Processes” list.
Normally, you should at least see the process for JConsole itself:
If you do not see any process in the list, not even JConsole’s, then you probably have a permission issue. Let’s see how can that happen.
When you are running a JVM, it generates a log file for each of your JVM processes. These log files contain performance related information, and are by default stored in a folder called hsperfdata_yourusername under your operating system’s temp folder.
JConsole is using these log files, to show you the list of local processes. So if the log files do not exist, you will see an empty list under “Local Processes”. The reason why there are no log files for your processes could be, that the JVM does not have enough permissions to create them.
The easiest solution to this is to just delete this log folder and let the JVM recreate it with the correct permissions.
To find it in it’s default location on Windows, you can just check the contents of your TMP environment variable:
> echo %TMP% C:\Users\Username\AppData\Local\Temp
Look for a folder called hsperfdata_yourusername in this temp diretory and simply delete it.
Relaunch JConsole and your applications that need monitoring, and you should now see your local processes.