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

October 10, 2014 | By the+gnu+linux+evangelist | Filed in: Tutorial.

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.

Step-by-step – OpenJDK 17 Linux Mint Installation

  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


    export JVMFLAGS="-Xmx1500m"

    Set Size with ‘m’ postfix for Megabites and ‘g’ for Gigabites.
    Ctrl+x to Save & Exit from nano Editor :)


    To Load the New SetUp!

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

QuickChic Theme • Powered by WordPress