If VisualVM cannot find your JDK automatically, you can manually define it using the --jdkhome flag in the command line or by editing the visualvm.conf file located in the etc folder.
If it doesn't find your Java installation automatically, you can specify it via the command line using --jdkhome "path/to/jdk" or by editing the etc/visualvm.conf file. Download - VisualVM
VisualVM is currently distributed as a standalone tool on GitHub.
Follow these steps to get VisualVM up and running on your local machine:
If you use a package manager: