How to run Eclipse MAT (Memory Analyzer Tool) on macOS
Hi! In this article, I would like to describe the issue I faced with running Eclipse’s MAT (Memory Analyzer Tool) on macOS. I’m using macOS Catalina (version 10.15.4).
Download MAT
I’ve downloaded MAT from the official page — https://www.eclipse.org/mat/downloads.php and then unpacked downloaded ZIP archive. At first, I couldn’t open the application because of the following warning:
If you see the same warning, instead of clicking LMB twice, click RMB once and after that choose Open.
Problem — An error has occurred
Oops! That does not look good. Let’s see what the error was. In terminal go to the directory under displayed path and list files:
Open .log file in your favourite editor (which is VIM of course) or in something more syntax-highlighting friendly (like VS Code) and check what the error is:
The important part is:
Solution
After a little bit of stackoverflowing I found a solution in one of the responses from this question How to run Eclipse memory analyzer on macOS?
- Create a directory for MAT workspace:
2. Move MAT to applications directory:
3. Update MAT initial settings by providing workspace path:
Go to MAT application directory and find MemoryAnalyzer.ini file
Add the following lines to MemoryAnalyzer.ini:
In my case the whole file has the following content:
Voila !
Now you can type “mat.app” in Spotlight Search and application should open without any errors :)
Words by Aleksander Kołata, Senior Full Stack Developer at Altimetrik Poland
Copywriting by Kinga Kuśnierz, Content Writer at Altimetrik Poland