'Eclipse not compatible with version 1.8.0_333 of the JVM

I downloaded Eclipse IDE to learn how to code, but it only says that it isn't compatible with such version, I tried other methods mentioned in previous questions but nothing worked so far.



Solution 1:[1]

  1. Go to the directory where the Eclipse IDE is installed and open the eclipse.ini file.

enter image description here

  1. Go to the directory where JDK is installed and copy the path to the javaw.exe file in the ..\bin directory.

enter image description here

  1. Add the -vm option above the -vmargs option in the eclipse.ini file as follows:
-vm
C:\Program Files\Java\jdk-18.0.1.1\bin\javaw.exe

The -vm option must occur after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the JVM.

  1. Save the change in the eclipse.ini file and run the eclipse.exe file.

References

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1