Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Ant runs out of memory in Eclipse
Ant runs out of memory in Eclipse [message #290844] Fri, 02 September 2005 03:51 Go to next message
Eclipse UserFriend
Originally posted by: bradley.wagner.hannonhill.com

I know this has been asked before, but I could find no definitive answer on the web or on this forum.

Currently, I start Eclipse with the following command:
C:\Java\eclipse-3.1\eclipse.exe -data C:\Java\workspace\ -vm C:\Program
Files\Java\jre1.5.0_02\bin\javaw.exe" -vmargs -Xms512m -Xmx768m

However, I'm getting out of memory errors, with a message to increase the heap size. I'm using
Ant1.6.5, Eclipse3.1, and Java1.5

I'm pretty sure 768MB should be PLENTY of memory for this process. It doesn't look like it's using
anywhere close to that when it fails. I tried the same thing with 1.4.2_09 jre as well, with the
same results. Any ideas?

Bradley
Re: Ant runs out of memory in Eclipse [message #290845 is a reply to message #290844] Fri, 02 September 2005 04:46 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Are you running Ant in the same or separate JRE as Eclipse?
See the JRE tab for your Ant launch configuration.
Set to run in a separate JRE and increase the heap size for that VM

HTH
Darins

"Bradley Wagner" <bradley.wagner@hannonhill.com> wrote in message
news:df8i7l$a3d$1@news.eclipse.org...
>I know this has been asked before, but I could find no definitive answer on
>the web or on this forum.
>
> Currently, I start Eclipse with the following command:
> C:\Java\eclipse-3.1\eclipse.exe -data C:\Java\workspace\ -vm C:\Program
> Files\Java\jre1.5.0_02\bin\javaw.exe" -vmargs -Xms512m -Xmx768m
>
> However, I'm getting out of memory errors, with a message to increase the
> heap size. I'm using Ant1.6.5, Eclipse3.1, and Java1.5
>
> I'm pretty sure 768MB should be PLENTY of memory for this process. It
> doesn't look like it's using anywhere close to that when it fails. I tried
> the same thing with 1.4.2_09 jre as well, with the same results. Any
> ideas?
>
> Bradley
Re: Ant runs out of memory in Eclipse [message #290873 is a reply to message #290845] Fri, 02 September 2005 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bradley.wagner.hannonhill.com

I don't quite understand. I only have a single JRE installed at any given time. I tried it once with
1.5 and once 1.4. Under Eclipse preferences->java-intalled JREs, it will either have 1.5 or 1.4
listed not both. I made sure to pass vmargs to Eclipse when it starts. Are you saying that I need
install another JRE and have it use a different heap size. What about just two instances of the same
JRE with their own heap?

Bradley

Darin Swanson wrote:
> Are you running Ant in the same or separate JRE as Eclipse?
> See the JRE tab for your Ant launch configuration.
> Set to run in a separate JRE and increase the heap size for that VM
>
> HTH
> Darins
>
> "Bradley Wagner" <bradley.wagner@hannonhill.com> wrote in message
> news:df8i7l$a3d$1@news.eclipse.org...
>
>>I know this has been asked before, but I could find no definitive answer on
>>the web or on this forum.
>>
>>Currently, I start Eclipse with the following command:
>>C:\Java\eclipse-3.1\eclipse.exe -data C:\Java\workspace\ -vm C:\Program
>>Files\Java\jre1.5.0_02\bin\javaw.exe" -vmargs -Xms512m -Xmx768m
>>
>>However, I'm getting out of memory errors, with a message to increase the
>>heap size. I'm using Ant1.6.5, Eclipse3.1, and Java1.5
>>
>>I'm pretty sure 768MB should be PLENTY of memory for this process. It
>>doesn't look like it's using anywhere close to that when it fails. I tried
>>the same thing with 1.4.2_09 jre as well, with the same results. Any
>>ideas?
>>
>>Bradley
>
>
>
Re: Ant runs out of memory in Eclipse [message #290877 is a reply to message #290873] Fri, 02 September 2005 15:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bradley.wagner.hannonhill.com

I think I figured it out. Basically, it looks the vm args that you pass to Eclipse when you start it
aren't passed along when the JRE in the app itself to compile/run programs. What I had to do was go
to preferences->Java->installed jres and set the VM args for the JRE i had there to use a max heap
size of 768m. Then it worked fine.

B

Bradley Wagner wrote:
> I don't quite understand. I only have a single JRE installed at any
> given time. I tried it once with 1.5 and once 1.4. Under Eclipse
> preferences->java-intalled JREs, it will either have 1.5 or 1.4 listed
> not both. I made sure to pass vmargs to Eclipse when it starts. Are you
> saying that I need install another JRE and have it use a different heap
> size. What about just two instances of the same JRE with their own heap?
>
> Bradley
>
> Darin Swanson wrote:
>
>> Are you running Ant in the same or separate JRE as Eclipse?
>> See the JRE tab for your Ant launch configuration.
>> Set to run in a separate JRE and increase the heap size for that VM
>>
>> HTH
>> Darins
>>
>> "Bradley Wagner" <bradley.wagner@hannonhill.com> wrote in message
>> news:df8i7l$a3d$1@news.eclipse.org...
>>
>>> I know this has been asked before, but I could find no definitive
>>> answer on the web or on this forum.
>>>
>>> Currently, I start Eclipse with the following command:
>>> C:\Java\eclipse-3.1\eclipse.exe -data C:\Java\workspace\ -vm
>>> C:\Program Files\Java\jre1.5.0_02\bin\javaw.exe" -vmargs -Xms512m
>>> -Xmx768m
>>>
>>> However, I'm getting out of memory errors, with a message to increase
>>> the heap size. I'm using Ant1.6.5, Eclipse3.1, and Java1.5
>>>
>>> I'm pretty sure 768MB should be PLENTY of memory for this process. It
>>> doesn't look like it's using anywhere close to that when it fails. I
>>> tried the same thing with 1.4.2_09 jre as well, with the same
>>> results. Any ideas?
>>>
>>> Bradley
>>
>>
>>
>>
Re: Ant runs out of memory in Eclipse [message #290887 is a reply to message #290877] Fri, 02 September 2005 15:47 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Note that I was describing the Ant JRE tab which is included for all Ant
launch configurations...but setting the global VM args will work as well
(might even be better :-) ).

Glad things are working
Darins

"Bradley Wagner" <bradley.wagner@hannonhill.com> wrote in message
news:df9qn0$v52$1@news.eclipse.org...
>I think I figured it out. Basically, it looks the vm args that you pass to
>Eclipse when you start it aren't passed along when the JRE in the app
>itself to compile/run programs. What I had to do was go to
>preferences->Java->installed jres and set the VM args for the JRE i had
>there to use a max heap size of 768m. Then it worked fine.
>
> B
>
> Bradley Wagner wrote:
>> I don't quite understand. I only have a single JRE installed at any given
>> time. I tried it once with 1.5 and once 1.4. Under Eclipse
>> preferences->java-intalled JREs, it will either have 1.5 or 1.4 listed
>> not both. I made sure to pass vmargs to Eclipse when it starts. Are you
>> saying that I need install another JRE and have it use a different heap
>> size. What about just two instances of the same JRE with their own heap?
>>
>> Bradley
>>
>> Darin Swanson wrote:
>>
>>> Are you running Ant in the same or separate JRE as Eclipse?
>>> See the JRE tab for your Ant launch configuration.
>>> Set to run in a separate JRE and increase the heap size for that VM
>>>
>>> HTH
>>> Darins
>>>
>>> "Bradley Wagner" <bradley.wagner@hannonhill.com> wrote in message
>>> news:df8i7l$a3d$1@news.eclipse.org...
>>>
>>>> I know this has been asked before, but I could find no definitive
>>>> answer on the web or on this forum.
>>>>
>>>> Currently, I start Eclipse with the following command:
>>>> C:\Java\eclipse-3.1\eclipse.exe -data C:\Java\workspace\ -vm C:\Program
>>>> Files\Java\jre1.5.0_02\bin\javaw.exe" -vmargs -Xms512m -Xmx768m
>>>>
>>>> However, I'm getting out of memory errors, with a message to increase
>>>> the heap size. I'm using Ant1.6.5, Eclipse3.1, and Java1.5
>>>>
>>>> I'm pretty sure 768MB should be PLENTY of memory for this process. It
>>>> doesn't look like it's using anywhere close to that when it fails. I
>>>> tried the same thing with 1.4.2_09 jre as well, with the same results.
>>>> Any ideas?
>>>>
>>>> Bradley
>>>
>>>
>>>
>>>
Re: Ant runs out of memory in Eclipse [message #290889 is a reply to message #290877] Fri, 02 September 2005 15:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

That's what Darin meant. Because they're running as two seperate Java processes, they don't share any memory, and the maximum size of the Eclipse workbench is completely independent of the maximum size of the Ant script. So you could have -Xmx256m for the Eclipse runtime and -Xmx1500m for the ant script if you wanted.
Re: Ant runs out of memory in Eclipse [message #290907 is a reply to message #290889] Fri, 02 September 2005 18:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bradley.wagner.hannonhill.com

Alex Blewitt wrote:
> So you could have -Xmx256m for the Eclipse runtime and -Xmx1500m for the ant script if you wanted.

That's probably a good idea, as there's no reason for Eclipse itself to have 768m as a max heap size
or 512m minimum more importantly, right? What are the defaults for the Eclipse runtime anyway? I
would think 256 would more more than sufficient no?

Bradley
Re: Ant runs out of memory in Eclipse [message #291039 is a reply to message #290907] Tue, 06 September 2005 16:38 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse3.rizzoweb.com

Bradley Wagner wrote:
> Alex Blewitt wrote:
>
>> So you could have -Xmx256m for the Eclipse runtime and -Xmx1500m for
>> the ant script if you wanted.
>
>
> That's probably a good idea, as there's no reason for Eclipse itself to
> have 768m as a max heap size or 512m minimum more importantly, right?
> What are the defaults for the Eclipse runtime anyway? I would think 256
> would more more than sufficient no?

It depends somewhat on how big your Eclipse workspace is and how the
plugins that are installed use memory. I typically set the maximum heap
to 256MB or 512 - on machines with 1GB RAM that seems to be a reasonable
choice and I never get out of memory error from Eclipse.

HTH,
Eric
Previous Topic:Eclipse supported platforms
Next Topic:XSLT & ANT
Goto Forum:
  


Current Time: Fri Apr 26 07:15:36 GMT 2024

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

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

Back to the top