Does anyone know how to specify what jvm eclipse will launch itself with when it switches workspace? If I start eclipse with an eclipse.ini containing:
This is a problem as our plugins that require 1.7 consquently fail to load. This is on OSX 10.7.5 but it also happens on 10.8.
JAVA_HOME points to the 1.7 jvm and /usr/bin/java is also symlinked to the 1.7 jvm. /usr/bin appears near the head of my PATH and in fact its the only java on my path. I'm guessing that eclipse must assume that the "best" jvm is the one in /System/Library/Frameworks/JavaVM.framework/Versions/Current or /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK and that points 1.6.
> Does anyone know how to specify what jvm eclipse will launch itself
> with when it switches workspace? If I start eclipse with an eclipse.ini
> containing:
I believe you cannot do that. This utility will help you when opening
another workspace, and might ease the pain somewhat: https://marketplace.eclipse.org/content/osx-eclipse-launcher
>
> -vm
> Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/bin/java
>
> eclipse launches with that jre. The console output confirms this:
>
> 5/14/13 4:01:16.932 PM [0x0-0x51b51b].org.eclipse.eclipse:
> eclipse.buildId=M20130204-1200 5/14/13 4:01:16.932 PM
> [0x0-0x51b51b].org.eclipse.eclipse: java.version=1.7.0_17 5/14/13
> 4:01:16.932 PM [0x0-0x51b51b].org.eclipse.eclipse: java.vendor=Oracle
> Corporation
>
> When I switch the workspace though for some reason it launches itself
> with a 1.6 jvm.
> 5/14/13 4:07:51.596 PM [0x0-0x51b51b].org.eclipse.eclipse:
> eclipse.buildId=M20130204-1200
> 5/14/13 4:07:51.597 PM [0x0-0x51b51b].org.eclipse.eclipse:
> java.version=1.6.0_45
> 5/14/13 4:07:51.597 PM [0x0-0x51b51b].org.eclipse.eclipse:
> java.vendor=Apple Inc.
>
>
> This is a problem as our plugins that require 1.7 consquently fail to
> load. This is on OSX 10.7.5 but it also happens on 10.8.
>
> JAVA_HOME points to the 1.7 jvm and /usr/bin/java is also symlinked to
> the 1.7 jvm. /usr/bin appears near the head of my PATH and in fact its
> the only java on my path. I'm guessing that eclipse must assume that
> the "best" jvm is the one in
> /System/Library/Frameworks/JavaVM.framework/Versions/Current or
> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK and
> that points 1.6.
I believe you're correct with regards to the method Eclipse is using
for determining which JVM to use. The correct behaviour would probably
be to use the same JVM as the initial Eclipse, alternatively the one
specified in eclipse.ini.