Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » OutOfMemoryError: Java heap space (vmargs does not work)
OutOfMemoryError: Java heap space (vmargs does not work) [message #870124] Sun, 06 May 2012 18:46 Go to next message
Tim Buktu is currently offline Tim BuktuFriend
Messages: 2
Registered: May 2012
Junior Member
Hi all,

I have a desktop project (some kind of IO simulator) where the idea is to keep in memory a huge amount of data (from 2 Gb to 32 Gb). (P.S. It is an idea - not a design bug Smile)

If I just execute the project (java -Xms64m -Xmx3g ProjectName) it works perfect: memory is allocated as expected (e.g. Runtime.getRuntime().maxMemory() returns 2730 MB).


If I now try to run the project from Eclipse (e.g. for Debug perposes) I get the OutOfMemoryError: Java heap space.

In "eclipse.ini" I have the following lines
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms64m
-Xmx3g

and the Runtime.getRuntime().maxMemory() returns olny 849 MB. That's why the error actually occurs - the parametrs seems to be not applied. But they are (as expected) in the command line present.

What could be the reason for this?

Here is my configuration:

Ubuntu 12.04 64-bit
Kernel Linux 3.2.0-24-generic
Memory 3.7Gb
Eclipse Java EE IDE for Web Developers. (Indigo Service Release 2)
Java version 1.6.0_29
64-bit Server VM

I also attach the whole configuration file.

Thanks a lot for any ideas!
  • Attachment: eclipse.ini
    (Size: 0.40KB, Downloaded 349 times)
Re: OutOfMemoryError: Java heap space (vmargs does not work) [message #870127 is a reply to message #870124] Sun, 06 May 2012 19:31 Go to previous messageGo to next message
Tassilo Horn is currently offline Tassilo HornFriend
Messages: 93
Registered: July 2009
Member
Tim Buktu <forums-noreply@xxxxxxxx> writes:

Hi Tim,

> If I now try to run the project from Eclipse (e.g. for Debug perposes)
> I get the OutOfMemoryError: Java heap space.
>
> In "eclipse.ini" I have the following lines
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -XX:MaxPermSize=256m
> -Xms64m
> -Xmx3g

The JVM args in eclipse.ini apply to the eclipse project itself, not to
the java processes spawned by running your project from inside eclipse.
In the run configuration for your project, there's a JVM Args textfield
where yoh can add -Xmx3g for your app.

Bye,
Tassilo
--
Dipl.-Inform. Tassilo Horn | Room: B015
University of Koblenz-Landau, Campus Koblenz | Phone: +49 (261) 287-2745
Institute for Software Technology | Mail: horn@xxxxxxxx
Universitätsstr. 1, 56070 Koblenz, Germany |
Re: OutOfMemoryError: Java heap space (vmargs does not work) [message #870193 is a reply to message #870127] Mon, 07 May 2012 08:27 Go to previous message
Tim Buktu is currently offline Tim BuktuFriend
Messages: 2
Registered: May 2012
Junior Member
Thanks Tassilo,

the problem solved!
Previous Topic:Eclipse locking folders on OpenSUSE Linux server
Next Topic:[Common Navigator View] How to restore expanded nodes?
Goto Forum:
  


Current Time: Thu Mar 28 23:33:34 GMT 2024

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

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

Back to the top