Move the visualvm_221.zip file to /opt (a standard directory for third-party applications) and extract it:
$ sudo mkdir -p /opt/visualvm
$ sudo unzip visualvm_221.zip -d /opt/visualvmThe folder will be located at /opt/visualvm/visualvm_221.
Go to the bin folder and make the visualvm file executable:
$ cd /opt/visualvm/visualvm_221/bin
$ sudo chmod +x visualvmRun VisualVM directly from the bin folder:
$ ./visualvmIf successful, the VisualVM GUI should appear.
To run VisualVM from any terminal location, create a symlink:
$ sudo ln -s /opt/visualvm/visualvm_221/bin/visualvm /usr/local/bin/visualvmNow you can simply run:
$ visualvmfrom anywhere.
Create a .desktop file so VisualVM appears in the application menu:
$ nano ~/.local/share/applications/visualvm.desktopAdd the following content:
[Desktop Entry]
Version=1.0
Type=Application
Name=VisualVM
Exec=/opt/visualvm/visualvm_221/bin/visualvm
Icon=/opt/visualvm/visualvm_221/etc/visualvm.icns
Terminal=false
Categories=Development;IDE;Save the file and make it executable:
$ chmod +x ~/.local/share/applications/visualvm.desktopVisualVM will now appear in your Elementary OS application menu.
Run VisualVM from the terminal or the menu to ensure it works:
$ visualvmIf the GUI launches without errors, the installation is complete.