Apple has seen fit to remove the Java Preferences app from the Utilities folder so there's no longer any GUI way to go about increasing the allocated memory limit for Java.
I'm not really a commandline guy so I thought I'd ask here.
I have a few apps that need large memory allocations, I'm running 16GB of RAM on this machine so I'm not concerned about running other apps while these run, not to mention I don't run these apps very often. I'd like to increase my allowed memory limit to 6144m but I can't see how to do it correctly.
This is the code I found but after running it and checking my Activity Monitor the app in question is still only accessing about 800m and it eventually uses up the heap and crashes.
export _JAVA_OPTIONS='-Xmx6144m'
Can someone please help me with this?
For 64 bit platforms and Java stacks in general, the recommended Maximum Heap range for WebSphere Application Server, would be between (4096M - 8192M) or (4G - 8G).
On Mac OSX one can easily change heap size by going to first menu item, Android Studio > preference > System Settings (left menu) > Memory Settings and change heap size there in the dialog. Save this answer.
From this article on the missing Java Preferences after the recent update it looks like you can download Java 1.7 and will then have access to Oracle's Java Preferences under System Preferences.
Note that your apps may or may not run under Java 1.7 - upgrading can always be risky.
The trick is to edit /etc/launchd.conf
(you need to do this as an administrator); adding
setenv _JAVA_OPTIONS "-Xmx6144m"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With