Last Updated: February 25, 2016
·
1.567K
· jmpergar

Java Heap Space - JVM - Set memory

-Xmx sets the maximum memory heap size
-Xms sets the minimum memory heap size

java -XmsVALUEMIN -XmxVALUENMAX myApp.jar

Example:

java -Xms512M -Xmx1024M osmosis.jar

3 Responses
Add your response

Se utiliza mucho a la hora de arrancar servidores de aplicaciones tipo Tomcat, también lo he tenido que utilizar alguna que otra vez en eclipse con proyectos gordos del trabajo

over 1 year ago ·

I knew about the maximum heap size but didn't know about minimum heap size. Thanks for sharing. Just curious: when would you have to set the minimum heap size?

over 1 year ago ·

@arpohahau I suppose when you want to ensure a minimum efficiency.

over 1 year ago ·