In this tutorial, I will guide you on how to resolve the issue of an incompatible JVM for Eclipse 2021-09 on Windows 11 x64. After installing Eclipse 2021-09 along with JDK 17.0.1 on Windows 11, Eclipse restarted and an error message appeared indicating that a JVM of version 11 or greater was required, while version 1.8.0_131 of the JVM was found to be unsuitable. This happened as, despite selecting JDK 17 during installation, Eclipse was trying to locate only JDK 8.
To resolve this, you need to specify the correct JVM for Eclipse. The startup of Eclipse is controlled by the options in the eclipse.ini file in your Eclipse installation directory (e.g. C:\Program Files\eclipse\java-2021-09\eclipse\eclipse.ini). To specify the desired JVM, add the -vm option and its path after the other Eclipse-specific options, but before -vmargs.
Here is an example of the updated eclipse.ini file for Windows 11, using JDK 17.0.1:
-vm
C:\Program Files\Java\jdk-17.0.1\bin\javaw.exe