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
/Users/lindaoctalina/eclipse_folder/eclipse3.4.1/Eclipse.app/Contents/MacOS/eclipse.ini - Open and edit eclipse.ini and add “-vm” and your java home before “-vmargs”:
* Mac-vm
/System/Library/Frameworks/JavaVM.framework/Home* Ubuntu
-vm
/usr/lib/jvm/java-6-sun - Start up your eclipse again
Thanks to Oliver for helping me out
1 comment
Blah says:
October 13, 2009 at 4:16 am (UTC -4)
Thanks.