Setting Up the Java Heap Memory for Java JVM on Linux
The Linux Tip Show Step-by-step How to Set/Change/ the Java JDK Heap Memory Size on Linux JVM.
Java Objects Reside in an area called the Heap. The heap is created when the JVM starts up and may increase or decrease in size while the application runs. When the heap becomes full, garbage is collected. During the garbage collection objects that are no longer used are cleared, thus making space for new objects.
-
Open a Command Line Terminal Session.
-
Setting Up the Java Heap Memory Size
nano $HOME/.bashrc
Append:
export JVMFLAGS="-Xmx1500m"
Set Size with ‘m’ postfix for Megabites and ‘g’ for Gigabites.
Ctrl+x to Save & Exit from nano Editor :)bash
To Load the New SetUp!
Installing Eclipse for Java Developers on Linux: