«

»

Jul
02

Add java path to Eclipse (Mac/Ubuntu)

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:

  1. Exit your eclipse
  2. 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
  3. 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
  4. Start up your eclipse again ;)

Thanks to Oliver for helping me out

Permanent link to this article: http://lindaocta.com/?p=180

1 comment

  1. Blah says:

    Thanks. :)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>