[英]Increasing the JVM heap memory using Xmx doesn't work
I'm developping a javafx application which has much ui interfaces, and while opening many windows, the jvm start consumming much memory ( going up tp 350mb ). I'm developping a javafx application which has much ui interfaces, and while opening many windows, the jvm start consumming much memory ( going up tp 350mb ).
When it arrives to 360mb , the programs starts lagging and end up by being crashed (nothing works, screen blocks...) and the console show a OutOfMemoryException
with Java Heap Space error
当它到达360mb时,程序开始滞后并最终崩溃(没有任何效果,屏幕阻塞......)并且控制台显示OutOfMemoryException
和Java Heap Space error
I've 6gb of memory in my computer, and tried to start the .jar
file using -Xmx
param, but still the operating system doesn't allow the jvm to consume more memory. I've 6gb of memory in my computer, and tried to start the .jar
file using -Xmx
param, but still the operating system doesn't allow the jvm to consume more memory.
Is there anything else i should specify so that the jvm may be able to get as much memory as it needs?还有什么我应该指定的,以便 jvm 可以获得尽可能多的 memory 吗?
You might want to ensure that you're using:您可能希望确保您使用的是:
java -Xmx1024m -jar YourApplication.jar
and not:并不是:
java -jar YourApplication.jar -Xmx1024m
Anything after the.jar is considered as argument passed to your executable Jar. .jar 之后的任何内容都被视为传递给可执行文件 Jar 的参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.