This page has been machine-translated from the original page.
When installing Eclipse Memory Analyzer, which is useful for analyzing Java VM dump files (.hprof), I ran into the version 1.8.0_261 of the jvm is not suitable error. This article summarizes how to fix it.
First, download the standalone binary of Eclipse Memory Analyzer from the link below.
Reference: Eclipse Memory Analyzer Open Source Project | The Eclipse Foundation
Next, download a version of Java that satisfies the dependency requirements. This time, I downloaded Java 17 from the source below.
Reference: Java Downloads | Oracle
After running the downloaded installer, the files were extracted to C:\Program Files\Java\jdk-17\.
Next, extract the downloaded Eclipse Memory Analyzer and add the following lines to MemoryAnalyzer.ini.
-vm
C:\Program Files\Java\jdk-17\bin\javaw.exeThis lets you specify Java 17 as the Java version used by Eclipse Memory Analyzer and avoid the version 1.8.0_261 of the jvm is not suitable error.
The updated MemoryAnalyzer.ini looked like this.
# MemoryAnalyzer.ini
-startup
plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.700.v20221108-1024
-vm
C:\Program Files\Java\jdk-17\bin\javaw.exe
-vmargs
--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
-Xmx1024mAfter that, I was able to start MemoryAnalyzer.exe.