I am looking for a way to change the default JVM memory settings on OS X, not for a specific application.

And, yes I know that each application can override this.

Currently running Java 1.6 on OS X 10.8


This should do the trick:

  1. Go to Applications / Utilities and open the Java Preferences.
  2. Select the Java version you're interested in.
  3. Hit Options and add the Heap size argument, which is -Xmx followed by amount of memory you want it to have. (e.g. -Xmx1024).
  • i just tried your method , everything's fine but when i open the java preferences there's is no "Option" button. Thank you Running with a Macbook pro 13" , Os 10.8.3 , 2,5 GHz Intel Core i5, 8go 1600n MHz DDR3 Java 7 Maj 17. Apr 7 '13 at 13:48

Three options for configuring JVM's Heap:

I) System Preferences -> Click on Java icon. enter image description here

Then go to "Java" tab -> View... -> Add "-Xmx9000M" to Runtime Parameters section. enter image description here

II) Increase it in Tomcat: Follow these instructions= https://community.microstrategy.com/s/article/How-to-increase-the-Java-Heap-size-in-Tomcat-Application-Server

To increase the Java heap size in Tomcat, follow the instructions below:

1) Go to /bin and create a file named http://setenv.sh for Linux systems or setenv.bat for Windows.

2) Inside the setenv file, use the following format to set the heap size using the following parameters: Linux: export CATALINA_OPTS="-Xms4096M -Xmx4096M"

III) Increase it in the GUI (Intellij or Eclipse).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .