Whenever we install a new version of Eclipse IDE, which comes with the latest support for JVM, while opening Eclipse IDE, we may get the following error:
Version 1.8.0_301 of the JVM is not suitable for this product. Version 17 or greater is required.
Steps to resolve JVM version 17 or greater is required
Step 1- Eclipse installation directory
First, we need to go to the Eclipse installation directory. For this, right-click on Eclipse > Open File Location.
Step 2- Update Eclipse configuration file
In the Eclipse installation directory, we have an Eclipse configuration file.
We need to add the following command to our Eclipse configuration file:
eclipse.ini
-vm
C:\Program Files\Java\jdk-21\bin\javaw.exe
Note: Make sure to add the latest version of the JDK path that is installed in your system.
In the above command,
- -vm is used in context to Java Virtual Machine for Java development environment.
- C:\Program Files\Java\jdk-21\bin\ is the directory where our JDK-21 is installed.
- \bin\javaw.exe refers to the javaw.exe executable, which is a variation of the java.exe executable used to launch Java applications without a command prompt window.
Step 3- Result
After we have added the above command, we need to save these changes, and our issue (eclipse version 17 or greater is required) will be resolved. We can see below that our Eclipse launched successfully.