[ad_1]
I was getting this error on a Linux OS, but the following solution should work for all OSes.
Step 1: Open a command prompt
Type: java -version
You will see something like this –
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~16.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
(may vary depending on your computer and OS)
Step 2: open the eclipse.ini
file
The file is located at C:\Users\Yourusername\eclipse\java-2019-12\eclipse
Locate the following line –
-Dosgi.requiredJavaVersion=11
Change it to
-Dosgi.requiredJavaVersion=1.8
and restart Eclipse. It is there twice so change at both places. You may try to give the Java version specific to your system (from the output of step 1). This has worked for me.
[ad_2]