1

I have a problem with my Java application that require some extra space into the heap. I know that ion Netbeans user can increase heap size by

project->properties->run->JVM Option.. or using Netbeans.conf file.

I have tried adding:

 Netbeans.conf:
 -J-Xms512m -J-Xmx512m -J-XX:PermSize=512m -J-XX:MaxPermSize=512m 

And/or into project properties

-Xms512m -Xmx512m

but my problem still remain. And application crash whit OufOfMemory error when it reach about 60m of memory...

Have you got any alternative solutions?

If it can help.. I'm using windows as SO and Netbeans 7.4 and JDK 7.u45

prem30488
  • 2,749
  • 2
  • 19
  • 53
Mandels
  • 43
  • 1
  • 9
  • Without more details on your system and code we cannot really help. If you get an out of memory error and you know its not a heap size issue? then does your System/OS have enough "free" memory to spare? – sorifiend Nov 01 '13 at 02:48
  • Maybe you're just using a lot of memory. What does the program do? Also when the program loads print the value of `Runtime.getRuntime().freeMemory()` to verify your Xms is being respected. – Radiodef Nov 01 '13 at 02:57
  • the default max heap size is 1GB or 1/4 the memory of your system :http://stackoverflow.com/questions/4667483/how-is-the-default-java-heap-size-determined You've probably decreased the heap with those flags – vandale Nov 01 '13 at 03:31
  • see http://stackoverflow.com/questions/705605/java-heap-space-in-netbeans-but-ive-increased-the-heap-size-already?rq=1 You shouldn't touch the Netbeans.conf file add the flags to your project properties – vandale Nov 01 '13 at 03:33
  • The initial output of getFreeMemory() statement il about 64M ... Seems that net beans ignore configuration into VM Options or into Netbeans.conf. (My machine has 4Gb of Ram) – Mandels Nov 01 '13 at 08:28
  • Simply remove all the arguments.. make it blank and then try. Sometimes without any arguments it works... – prem30488 Apr 06 '14 at 15:07

0 Answers0