Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Failing to create JVM, but I have more than enough RAM(I've edited the .ini file and made some tests, but I can't assign more than 1024MB)
icon5.gif  Failing to create JVM, but I have more than enough RAM [message #877506] Sat, 26 May 2012 18:21 Go to next message
Jorge Antonio Díaz-Benito Soriano is currently offline Jorge Antonio Díaz-Benito Soriano
Messages: 10
Registered: May 2012
Junior Member
Hi,

I'm getting an OutOfMemory Java heap space exception, so I've tried to maximize all the arguments in the .ini file, which now looks like this:

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Xms1024m
-Xmx1024m
-XX:+UseParallelGC
-XX:PermSize=256m
-XX:MaxPermSize=512m

But my computer is 4GB RAM, 1 of them shared for graphic purpose. Why can't I set them higher? Is there anyway to fix it?

Thanks
Re: Failing to create JVM, but I have more than enough RAM [message #877642 is a reply to message #877506] Sun, 27 May 2012 05:06 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny Shifrin
Messages: 197
Registered: July 2009
Senior Member
Is your windows 32 or 64 bit architecture? It seems to me that Eclipse is 32 bit.
Re: Failing to create JVM, but I have more than enough RAM [message #877645 is a reply to message #877506] Sun, 27 May 2012 05:15 Go to previous messageGo to next message
Jorge Antonio Díaz-Benito Soriano is currently offline Jorge Antonio Díaz-Benito Soriano
Messages: 10
Registered: May 2012
Junior Member
My Eclipse is 32 bits, but the Windows 7 is 32 bits too - However, if this were the problem, I should be able to amplify the values a little bit more, up to 2048MB at least, isn't it?
Re: Failing to create JVM, but I have more than enough RAM [message #877696 is a reply to message #877645] Sun, 27 May 2012 08:36 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny Shifrin
Messages: 197
Registered: July 2009
Senior Member
So please remember that actually Windows 32 bit uses only 3 GB. From my experience, with 32 bit I could not give eclipse more than ~1GB ( not sure why Sad ). In case of 64 bit, I was able to give eclipse more (did not try more than 1.5 GB).
Re: Failing to create JVM, but I have more than enough RAM [message #877722 is a reply to message #877696] Sun, 27 May 2012 10:19 Go to previous messageGo to next message
Jorge Antonio Díaz-Benito Soriano is currently offline Jorge Antonio Díaz-Benito Soriano
Messages: 10
Registered: May 2012
Junior Member
"great", that doesn't grant that the 64-bits version could support the required amount of memory, since the integrated graphics take those 1024MB that could make the difference. I may format my computer and try it out, but sadly this may almost kill my project Sad

Thank you very much.
Re: Failing to create JVM, but I have more than enough RAM [message #877763 is a reply to message #877722] Sun, 27 May 2012 13:13 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1299
Registered: July 2009
Senior Member
On 05/27/2012 09:19 AM, Jorge Antonio Díaz-Benito Soriano wrote:
> "great", that doesn't grant that the 64-bits version could support the
> required amount of memory, since the integrated graphics take those
> 1024MB that could make the difference. I may format my computer and try
> it out, but sadly this may almost kill my project :(
>
> Thank you very much.
Are you getting the memory exception from Eclipse or from a program you
are running from Eclipse? If Eclipse is crashing with the heap space
error, then the eclipse.ini settings are how you add memory.

However, if the crash is happening in a program launched from Eclipse,
then you need to set the memory arguments on the programs launch
configuration. When Eclipse launches a program a new VM is created and
it needs its own settings.
Re: Failing to create JVM, but I have more than enough RAM [message #877766 is a reply to message #877763] Sun, 27 May 2012 13:21 Go to previous messageGo to next message
Jorge Antonio Díaz-Benito Soriano is currently offline Jorge Antonio Díaz-Benito Soriano
Messages: 10
Registered: May 2012
Junior Member
I'm getting it because of my program, as a runtime exception. No matter if I run it from inside Eclipse or from the command line through java -jar. In that case, doesn't the virtual machine get as much memory as it needs?
Re: Failing to create JVM, but I have more than enough RAM [message #877816 is a reply to message #877766] Sun, 27 May 2012 16:49 Go to previous messageGo to next message
Eclipse User
On 5/27/2012 1:21 PM, Jorge Antonio Díaz-Benito Soriano wrote:
> I'm getting it because of my program, as a runtime exception. No matter if I run it from inside Eclipse or from the command line through java -jar. In that case, doesn't the virtual machine get as
> much memory as it needs?

No there are certain defaults that java runtime would use. I think you would need to use cmdline arguments to override defaults.

My guess is a programming issue more than java runtime issue. (that is, something your doing is likely causing the exhaustion rather than an actually case of the program taking to much memory doing
its correct function.
Re: Failing to create JVM, but I have more than enough RAM [message #877999 is a reply to message #877816] Mon, 28 May 2012 05:28 Go to previous messageGo to next message
Jorge Antonio Díaz-Benito Soriano is currently offline Jorge Antonio Díaz-Benito Soriano
Messages: 10
Registered: May 2012
Junior Member
I don't think it is a programming issue. Although I'm using thread programming to increase performance, my program is about .SVG files (many of them) and multi-touch stuff, which I've been said are very heavy things.

So, how can I add the -XX:-HeapDumpOnOutOfMemoryError from inside Eclipse, so I don't have to deploy the project each time I want to test something?
Re: Failing to create JVM, but I have more than enough RAM [message #878100 is a reply to message #877999] Mon, 28 May 2012 10:35 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1299
Registered: July 2009
Senior Member
On 05/28/2012 04:28 AM, Jorge Antonio Díaz-Benito Soriano wrote:
> I don't think it is a programming issue. Although I'm using thread
> programming to increase performance, my program is about .SVG files
> (many of them) and multi-touch stuff, which I've been said are very
> heavy things.
>
> So, how can I add the -XX:-HeapDumpOnOutOfMemoryError from inside
> Eclipse, so I don't have to deploy the project each time I want to test
> something?
You enter these arguments in the VM arguments section of the Launch
Config for your program.

You can enter the memory settings arguments in this section as well.
Re: Failing to create JVM, but I have more than enough RAM [message #878122 is a reply to message #878100] Mon, 28 May 2012 11:39 Go to previous message
Jorge Antonio Díaz-Benito Soriano is currently offline Jorge Antonio Díaz-Benito Soriano
Messages: 10
Registered: May 2012
Junior Member
then either I'm writing it unproperly,

h_ttp://i1182.photobucket.com/albums/x446/Stoyicker/Capture-3.png

or my computer needs more RAM than its 2,93GB usable..
Previous Topic:Insert In SpringMVC
Next Topic:Generated JAR doesn't contain dependent libraries
Goto Forum:
  


Current Time: Fri Apr 18 10:18:45 EDT 2014

Powered by FUDForum. Page generated in 0.03608 seconds