Setup/Uninstall Oracle Java for Mac OS X
https://support.apple.com/en-us/HT202643
https://support.apple.com/kb/DL1572
# Uninstall Apple Java 6 (https://support.apple.com/kb/DL1572)
sudo rm -vrf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
sudo rm -vrf /Library/Java/JavaVirtualMachines/1.6.0*.jdk
# Uninstall Oracle Java JDK/JRE verisons
# - Java 8 (Stable): https://www.java.com/download/manual.jsp
# - Java 8 (Early Access Releases): https://jdk8.java.net/download.html
# - Java 9 (Early Access Releases): https://jdk9.java.net/download/
sudo rm -vrf /Library/Java/JavaVirtualMachines/{jdk,jre}*.jdk
sudo rm -vrf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm /Library/PreferencePanes/JavaControlPanel.prefPane
If this is a 64-bit OS, it uses server hydrated JVM option: http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#64bit_compilers
And the JVM in server mode if the parameter -Xmx
is not specified, it is considered equal to 1/4 of total free memory.
If you specify both the -Xmx
and -Xms
- then everything will be fine.
In RedHat blog recently had an article on the topic of optimization of JVM memory:
- Dude, where’s my PaaS memory? Tuning Java’s footprint in OpenShift (Part 1)
- Dude, where’s my PaaS memory? Tuning Java’s footprint in OpenShift (Part 2)
http://www.oracle.com/technetwork/java/hotspotfaq-138619.html