I’m using Eclipse juno and osx 10.8 . I have java 7 with eclipse setup by doing the trick here:
Eclipse 4.2, Mac OS X 10.8 (ML), and Java 6
sudo mkdir /System/Library/Java/JavaVirtualMachines
sudo su ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
When i go to switch workspaces I get a “Failed to create the Java Virtual Machine.” alert. Then I can start eclipse the normal way and its in the different workspace i chose. On the command line i see:
./eclipse -clean
No binding table for org.eclipse.ui.contexts.dialog
requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
Any idea how to make switching workspaces not throw the error and perform normally yet still use java 7?
I tried adding to info.plist:
<string>-vm</string>
<string>/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java</string>
as shown on stack overflow here
But i still get the error.
It seems to work now. I’m not sure what I did to make it work. Maybe restarting the computer, but i think it went away once i put a project in the workspace.