Reputation: 1490
I've been trying to run Eclipse using the JDK 7 (tried the official 7u5 release and the developer preview 7u6) on Mountain Lion, but it seems it always use the Apple's JDK 6u33.
I tried configuring the Info.plist to look for the vm on my JDK 7 installation path, but when I check the VM Eclipse is using, it shows up the 6u33.
I do can configure the JDK on Installed JRE's on Eclipse and use it to compile and validate my Java 7 project, but I can't use Hibernate Tools to generate my entities on the database, because the Hibernate Configurations can't load the entities using the JDK 6 on a project set to Java 7.
Is anyone successfully running Eclipse Indigo on JDK 7 on Mac OS X Mountain Lion? If yes, how could I do it?
Thanks in advance.
UPDATE
Just found a way to run Indigo on Mountain Lion on this link: https://apple.stackexchange.com/questions/58203/mountain-lion-with-java-7-only
Upvotes: 4
Views: 6719
Reputation: 49
It is dirty... but it works.. Trick your MAC that you have 1.6.0 though it points to Java 7
sudo mkdir /System/Library/Java/JavaVirtualMachines
sudo ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
Upvotes: 0
Reputation: 76
you can simply modify your eclipse.ini to point to JDK 7
http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Mac_OS_X_Example
i.e. add the following 2 lines to eclipse.ini:
-vm
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java
Upvotes: 0