Eclipse (Android) and Mountain Lion – Problem with Java version

Eclipse stopped working after upgrade to Mountain Lion.  My initial guess was that it could be due to Java not being available.  I installed Oracle Java 7.

Even then, eclipse wasn’t starting up.   I tried changing eclipse.ini to set the VM.   No avail.

Finally,  I realised it could be due to the new security settings in Mountain Lion. To resolve this, go to System Preferences > Security & Privacy > General, and choose the check-box for “Anywhere.”  (You may need to unlock the settings before you can make this change)

Finally, Eclipse started working.

 

Other useful information I came across during my search:

[Thread from StackOverflow]

JDK 7 will be installed under /Library/Java/JavaVirtualMachines/1.7.0.jdk, JDK 6 under /System/Library/Java/JavaVirtualMachines.

To trick OS X to accept Java 7 instead of proposing to install Java 6 a simple symlink is enough:

sudo mkdir /System/Library/Java/JavaVirtualMachines

sudo ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

Most Java Programms will run with this little hack without the need to install Java 6.

[Edit eclipse.ini to specify a Java version]

http://wiki.eclipse.org/Eclipse.ini#-vm_value%3a_Mac_OS_X_Example

Advertisements

2 Responses to Eclipse (Android) and Mountain Lion – Problem with Java version

  1. Ellie says:

    U truly produced quite a few excellent items in
    your post, “Eclipse (Android) and Mountain Lion – Problem with Java version | Documentum Cookbook”.
    I will remain returning to ur web page soon enough. Thanks a lot
    -Jaqueline

  2. Rudolph says:

    “Eclipse (Android) and Mountain Lion – Problem with Java version |
    Documentum Cookbook” ended up being a perfect
    blog post. If perhaps it had a lot more pix
    this would most likely be possibly even better. Cya ,Annette

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: