This is the problem of your jdk is not setup properly for current profile.
Before starting eclipse in your current profile. Run "java -version" command on your current profile where you are running eclipse. Surely it will ask to install jdk/jre even jdk already installed but on different profile.
Hence there is two way:
Solution 1. install jdk on current profile edit and add following lines
vi /etc/profile
export JAVA_HOME=/usr/local/jdk-1.8
export PATH=$PATH:$JAVA_HOME/bin
Solution 2: ~/.profiles
export JAVA_HOME=/usr/local/jdk-1.8
export PATH=$PATH:$JAVA_HOME/bin
Solution 3: I tried and working perfectly for me.
1. gedit /home/../eclipse/eclipse.ini
2. Add following line before -vmargs and any plugin or jar execution in eclipse.ini file
-startup
-vm
/usr/local/java/jdk1.8.0_251/bin/java.exe
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
This solution is perfectly working after explore from many stackoverflow suggestions and blogs.