eclipse.ini vm arguments - eclipse.ini File Location Mac, Windows

Published on August 3, 2022


eclipse.ini vm arguments - eclipse.ini File Location Mac, Windows

While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.

eclipse.ini is the configuration file used to control the Eclipse startup. We can configure Eclipse VM arguments such as JDK to be used (eclipse.ini vm), permgen space, maximum and minimum heap size using Xms, Xmx parameters.

eclipe.ini File Location

For windows, it’s in the same directory as eclipse.exe file, as shown in below image. eclipse.ini file location, eclipse.ini vm, eclipse.ini windows For Mac OS X, it’s found inside the app. So if Eclipse app is in Downloads directory, eclipse.ini file location will be:

pankaj$ cd ~/Downloads/Eclipse.app/Contents/Eclipse/

You can reach this location by first right clicking on Eclipse app and click on “Show Package Contents” and then in the next window navigate to Contents/Eclipse directory, as shown in below images. eclipse.ini, eclipse.ini vm eclipse.ini file, eclipse.ini file location mac Here is the example eclipse.ini file from my default eclipse installation.


Some important points about eclipse.ini file are:

  1. Each line before -vmargs contains an option followed by the value for option.
  2. All the lines after -vmargs are passed as JVM arguments, so all options and arguments for eclipse startup must be specified before -vmargs. For example -vm settings for JDK to be used.
  3. --launcher.XXMaxPermSize specifies the maximum permgen space to use by eclipse launcher, increase this value if your eclipse startup is failing with out of memory error.
  4. If you are getting Out of Memory errors, you should try to increase Permgen space and maximum heap space values. They are configured using VM arguments -XX:MaxPermSize, -Xms and -Xmx. Permgen space default value is configured as 256MB that is good for small to medium projects.

eclipse.ini vm argument

eclipse.ini vm argument is useful when you have multiple JDK installation and you want to make sure that your eclipse runs on a specific JVM, rather than picking system configured jdk path. It must be defined before -vmargs.

eclipse.ini vm argument Mac

My eclipse.ini file snippet showing -vm argument usage to configure eclipse to use JDK8 in Mac OS X.


You can configure it similarly for Windows or Linux operating systems. Just change the JDK bin directory path accordingly.

eclipse.ini Permgen Space

If you are getting java.lang.OutOfMemoryError: PermGen space error, mostly when you are working on larger code base, doing maven update for large projects etc. , then you should increase Permgen space. Below is the configuration to increase permgen space to 512 MB in eclipse.ini file.


Note that there is no more Permgen space from Java 8 onwards, so setting this option will have no effect. However you will also not get out of memory error because of permgen space.

eclipse.ini Heap Space

If you are getting OutOfMemoryError related to Heap space, then you can try to increase the maximum heap size available to eclipse. You can easily do it by editing -Xmx value. For example, below snippet will increase the eclipse heap size to 2 GB.


That’s all for a quick roundup on eclipse.ini configuration and VM arguments.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors
Default avatar


Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
DigitalOcean Employee
DigitalOcean Employee badge
May 27, 2020

i have tizen studio and increased XMS to 512 M and try to build project but it shows jvm terminated error exit 1. when i decrease xms it shows heap space/

- Mansur Rizoev

    DigitalOcean Employee
    DigitalOcean Employee badge
    March 19, 2020

    The snippet in the “eclipse.ini vm argument Mac” section helped me fix a problem encountered yesterday. After installing new JDKs for Java14 and new JDK8, STS 4 wouldn’t start (saw error message “Unable to create Java Virtual Machine”). Yesterday I was able to prove the sts.ini needed to be updated to change to a different JDK, and the snippet in this tip helped me make that change and get STS 4 running again, so I am once again a productive developer. Thank you - many tips about this issue were aimed at people using Windows computers instead of Macs.

    - Mike Hubbartt

      DigitalOcean Employee
      DigitalOcean Employee badge
      April 3, 2019

      Hi how to set VM argument via Java programs

      - Praveenraj

        DigitalOcean Employee
        DigitalOcean Employee badge
        August 5, 2016

        Hi, Can I set a system variable in eclipse.ini and read using runtime?

        - Radhakrishna

          Try DigitalOcean for free

          Click below to sign up and get $200 of credit to try our products over 60 days!

          Sign up

          Join the Tech Talk
          Success! Thank you! Please check your email for further details.

          Please complete your information!

          Featured on Community

          Get our biweekly newsletter

          Sign up for Infrastructure as a Newsletter.

          Hollie's Hub for Good

          Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

          Become a contributor

          Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

          Welcome to the developer cloud

          DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

          Learn more
          DigitalOcean Cloud Control Panel