前提是确定安装了jdk,并且java -version得到的结果正确。如果这样还是不行,那么就尝试下面的方法:
If you get this error even though you already have JDK in your system-just follow this steps:
1)open eclipse.ini file with text editor.
2)copy your jdk path by using -vm command (vm and your path should not be in same line)
eg:
-vm
/usr/lib/java/jdk1.7.0_75/jre/bin/java
3)-vm should be placed before -vmargs in eclipse.ini file.