Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse JVM on workspace switch
Eclipse JVM on workspace switch [message #1058747] Tue, 14 May 2013 20:51 Go to next message
Nick Collier is currently offline Nick CollierFriend
Messages: 20
Registered: July 2009
Junior Member
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:

 -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.

thanks,

Nick
Re: Eclipse JVM on workspace switch [message #1094934 is a reply to message #1058747] Mon, 26 August 2013 12:03 Go to previous message
Torkild U. Resheim is currently offline Torkild U. ResheimFriend
Messages: 13
Registered: July 2009
Junior Member
On 2013-05-14 20:51:18 +0000, Nick Collier said:

> 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.

Best regards,
Torkild
>
> thanks,
>
> Nick
Previous Topic:Asynchronous job which should be cancelable
Next Topic:HELP -CanNOT update few Eclipse plugins
Goto Forum:
  


Current Time: Sun Dec 21 01:59:43 GMT 2014

Powered by FUDForum. Page generated in 0.10248 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software