Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » eclipse.ini on Mac -vm being ignored
eclipse.ini on Mac -vm being ignored [message #485472] Fri, 11 September 2009 21:03 Go to next message
Raishad is currently offline RaishadFriend
Messages: 77
Registered: July 2009
Member
Hi,

I'm running Eclipse 3.4.1 for BIRT 3.2.1. I've found that I need to use
Java 5 or I encounter random crashes in the BIRT Report Designer.
So I've edited the eclipse.ini and added the -vm parameter, being sure
to have the -vm and path on separate lines.
But it seems this parameter is being ignored. When I start Eclipse and
check the configuration I see it is using the default Java 6.

I can modify the heap size and see the affects, so I know I am editing
the right file and it is being read.

Does anyone have any suggestions? If it helps, I'm running 10.6 Snow
Leopard. If I change my default VM to Java 5 using the Java Preferences
app, that does work. But I would like to have Java 6 be my default VM.

my eclipse.ini

-startup
.../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_ v20080819.jar
--launcher.library
.../../../plugins/org.eclipse.equinox.launcher.carbon.macosx _1.0.101.R34x_v20080731
-showsplash
org.eclipse.platform
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-l eopard/Home/bin/java
-vmargs
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts


The results of running java
$/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0- leopard/Home/bin/java
-version
java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)
Re: eclipse.ini on Mac -vm being ignored [message #487613 is a reply to message #485472] Wed, 23 September 2009 17:48 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
On the mac, the vm is started by loading the JavaVM.framework which is
"/System/Library/Frameworks/JavaVM.framework"

The launcher specifies which version of the vm to load by setting an
environment variable. We get the value to use as a version by parsing
your -vm argument and extracting the path segment after "/Versions/".
So in your case we end setting the version as "1.5.0-leopard".

I'm guessing that maybe "1.5.0-leopard" is not a good version, and
perhaps we want "1.5.0". You could try creating a symlink 1.5.0 and
point it at 1.5.0-leopard, and see if using that in the -vm works instead.

-Andrew

Raishad Maharaj wrote:
> Hi,
>
> I'm running Eclipse 3.4.1 for BIRT 3.2.1. I've found that I need to use
> Java 5 or I encounter random crashes in the BIRT Report Designer.
> So I've edited the eclipse.ini and added the -vm parameter, being sure
> to have the -vm and path on separate lines.
> But it seems this parameter is being ignored. When I start Eclipse and
> check the configuration I see it is using the default Java 6.
>
> I can modify the heap size and see the affects, so I know I am editing
> the right file and it is being read.
>
> Does anyone have any suggestions? If it helps, I'm running 10.6 Snow
> Leopard. If I change my default VM to Java 5 using the Java Preferences
> app, that does work. But I would like to have Java 6 be my default VM.
>
> my eclipse.ini
>
> -startup
> ../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v 20080819.jar
> --launcher.library
> ../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_ 1.0.101.R34x_v20080731
>
> -showsplash
> org.eclipse.platform
> -vm
> /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-l eopard/Home/bin/java
>
> -vmargs
> -Xdock:icon=../Resources/Eclipse.icns
> -XstartOnFirstThread
> -Xms40m
> -Xmx256m
> -XX:MaxPermSize=256m
> -Dorg.eclipse.swt.internal.carbon.smallFonts
>
>
> The results of running java
> $/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0- leopard/Home/bin/java
> -version
> java version "1.5.0_19"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
> Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)
Re: eclipse.ini on Mac -vm being ignored [message #488106 is a reply to message #487613] Fri, 25 September 2009 14:56 Go to previous message
Raishad is currently offline RaishadFriend
Messages: 77
Registered: July 2009
Member
Thanks for your suggestion. I ended up getting Eclipse to start with 1.5.
In case anyone else runs into the same situation...

I deleted the 1.5.0-leopard distribution that was floating around, and
ended up getting Java 1.5 from Apple following these instructions
http://chxor.chxo.com/post/183013153/installing-java-1-5-on- snow-leopard
Basically, you download the Java update from Apple and use Pacifist to
install only Java 1.5.



Andrew Niefer wrote:
> On the mac, the vm is started by loading the JavaVM.framework which is
> "/System/Library/Frameworks/JavaVM.framework"
>
> The launcher specifies which version of the vm to load by setting an
> environment variable. We get the value to use as a version by parsing
> your -vm argument and extracting the path segment after "/Versions/". So
> in your case we end setting the version as "1.5.0-leopard".
>
> I'm guessing that maybe "1.5.0-leopard" is not a good version, and
> perhaps we want "1.5.0". You could try creating a symlink 1.5.0 and
> point it at 1.5.0-leopard, and see if using that in the -vm works instead.
>
> -Andrew
>
> Raishad Maharaj wrote:
>> Hi,
>>
>> I'm running Eclipse 3.4.1 for BIRT 3.2.1. I've found that I need to
>> use Java 5 or I encounter random crashes in the BIRT Report Designer.
>> So I've edited the eclipse.ini and added the -vm parameter, being sure
>> to have the -vm and path on separate lines.
>> But it seems this parameter is being ignored. When I start Eclipse and
>> check the configuration I see it is using the default Java 6.
>>
>> I can modify the heap size and see the affects, so I know I am editing
>> the right file and it is being read.
>>
>> Does anyone have any suggestions? If it helps, I'm running 10.6 Snow
>> Leopard. If I change my default VM to Java 5 using the Java
>> Preferences app, that does work. But I would like to have Java 6 be my
>> default VM.
>>
>> my eclipse.ini
>>
>> -startup
>> ../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v 20080819.jar
>> --launcher.library
>> ../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_ 1.0.101.R34x_v20080731
>>
>> -showsplash
>> org.eclipse.platform
>> -vm
>> /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-l eopard/Home/bin/java
>>
>> -vmargs
>> -Xdock:icon=../Resources/Eclipse.icns
>> -XstartOnFirstThread
>> -Xms40m
>> -Xmx256m
>> -XX:MaxPermSize=256m
>> -Dorg.eclipse.swt.internal.carbon.smallFonts
>>
>>
>> The results of running java
>> $/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0- leopard/Home/bin/java
>> -version
>> java version "1.5.0_19"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
>> Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)
Previous Topic:[PDE Build] Ant customcallback not working when plugin is packaged
Next Topic:Toggle watchpoint retargetable action in variables view.
Goto Forum:
  


Current Time: Thu Mar 28 20:02:39 GMT 2024

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

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

Back to the top