I have read various posts in stackoverflow and I am trying to figure out how to increase my heap size for my JVM.
I know that the command -vmargs -Xms256m -Xmx4096m will increase the heap size.
But it is not working, or I don’t know how to use the command. I read that I should go to the JVM folder and type this command but I cant locate Java in my Virtual machine.
I also read that I can do it by changing the values in the eclipse.ini file but I am not able to find anything related to heapsize in my file. I can do a grep java and find out that my heap size is 324m.
Can someone guide me for where and how I should increase the heap size?
It depends on what application that you are trying to launch.
If you are running your java code from commandline using java executable, then you can simply pass these parameters as argument to java executable.
If you want increase Eclipse’s JVM memory, then you can update eclipse.ini by appending following lines to the end of file.
For any software which uses JVM (like tomcat, weblogic etc), you need to follow their documentation to set JVM arguments. Usually, they will provide startup script where you will have option to set the JVM arguments.