Descartes
Descartes

Reputation: 523

Eclipse isn't using allotted heap; I get an out of memory error?

I am using Eclipse (newly installed) to run some Java code, and for some reason I get an outOfMemoryError: Java heap space, however I set the -Xms and -Xmx to 1gb each and when I run the code, the little bar on the bottom never goes past 70 mb -_-. Can someone help me here? Thanks.

Upvotes: 1

Views: 247

Answers (1)

Vineet Reynolds
Vineet Reynolds

Reputation: 76709

You are getting the OOME when running your code (as a Java application, or within a Java application server). This JVM is different from the JVM used by Eclipse, and will have it's own Xms and Xmx values.

If you need to modify the settings for the launched process, you'll need to modify the runtime configuration of the project to specify the arguments to the JVM explicitly. The default values in use may be insufficient for your application.

Upvotes: 3

Related Questions