JVM Heap size Auto Max Allocation?

Hi there !

i have a question about JVM heap memory , does JVM auto allocate the max heap memory when i run my jar file(Built game) or do i need to use : java -Xmx4g -jar jarfile.jar to allocate the max heap size manually in every single launch…?

Thank you

If you don’t set it then it will use default values. Which could be fine for a lot of games.

1 Like

So, is there a way to set it up inside my java code ?
or is there a way to set it up for a .exe file




Okay thank you , i will do some search