Sometimes when you have more than one version of java running in your computer, Eclipse will get confuse and will not run properly especially when your JAVA_HOME is set to the java version that Eclipse does not like (sound like human).
To add java version to Eclipse:
- Exit your eclipse
- Locate your eclipse.ini file in eclipse folder. If you can’t find it, you can use locate command below:
lindaoctalina$ locate eclipse.ini
- Open and edit eclipse.ini and add “-vm” and your java home before “-vmargs”:
- Start up your eclipse again
Thanks to Oliver for helping me out