How To Install Jhat on Linux Distros With a Terminal Command

How To Install Jhat on Linux Distros With a Terminal Command

jhat

jhat is a Java Heap Analysis Tool in detail. We know the rest and it’s not something we get installed easily. Our tutorial is a very simple one-liner on the other hand.

Install jhat

  • Debian apt-get install openjdk-7-dbg Click to copy
  • Ubuntu apt-get install openjdk-7-dbg Click to copy
  • Arch Linux pacman -S jdk8-openjdk Click to copy
  • Kali Linux apt-get install openjdk-8-jdk-headless Click to copy
  • Fedora dnf install java Click to copy
  • Raspbian apt-get install openjdk-8-jdk Click to copy

Java Heap Analysis Tool.

How to use jhat?

Below are few example commands for jhat that you can use in the terminal.

Analyze a heap dump (from jmap), view via http on port 7000:
jhat dump_file.binClick to copy
Analyze a heap dump, specifying an alternate port for the http server:
jhat -p port dump_file.binClick to copy
Analyze a dump letting jhat use up to 8GB RAM (2-4x dump size recommended):
jhat -J-mx8G dump_file.binClick to copy
Installation of latest jhat command is available here for Debian, Ubuntudistros and it definitely could be installed on others like Arch, Kali, Fedora and Raspbians distro that has been installed in your machine. You can copy this command for your OS from above and paste that into your terminal and press enter. Once you run the command it would download the 2026 latest package from the repository and install it in your computer/server or whatever distrinbution you are using at this point in time.