How-to Set the Java JDK Heap Memory Size on Linux Easy Guide

October 10th, 2014 by thelinuxevangelist

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.

Change/Set Java Heap Memory Size on Linux - Featured
  1. Open a Command Line Terminal Session

  2. Installing Eclipse for Java Developers on Linux:

    Install Eclipse for Java Linux
  3. 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!

Share on Tumblr

Tags: , , , , , , , , , , , , , , , , ,


Comments are disabled