-
Java heap size
Hello,
I am trying to increase the heap size of JVM. I am using Eclipse as an IDE.
I do so by using eclipse -vmargs -Xmx2048m..
And when I try to see whether JVM has increased the size by
Runtime rt = Runtime.getRuntime();
System.out.println(rt.maxMemory());
But I find that the memory maximum which could be allocated is just 980mb.
Can anyone help me with this ?
Thanks,
Jahangir
-
how much available memory do you have on the machine you are trying to run this on? Why does eclipse need 2G of ram?
-
regd heap size
Hi myself also faced this and got resolved by following approach..
Try this
Just navigate in u r eclipse
Windows --> prefeence-->java-->installed JRE-->click on the java version installed and click edit button right and give the value -Xmx768m in theDefault VM arguments and click ok.
Thast it..
Close the eclipse and open it again..