简体   繁体   English

使用 Xmx 增加 JVM 堆 memory 不起作用

[英]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时,程序开始滞后并最终崩溃(没有任何效果,屏幕阻塞......)并且控制台显示OutOfMemoryExceptionJava 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.

相关问题 如何使用Xmx命令? (JVM堆内存) - How to use the Xmx command? (JVM Heap memory) 总(Tomcat)内存增加,但堆没有 - Total (Tomcat) memory increasing but heap doesn't 错误:内存不足:Java 堆空间。 使用 '-Xmx' JVM 选项配置 Gradle 内存设置 - Error: Out of memory: Java heap space. Configure Gradle memory settings using '-Xmx' JVM option 使用Xmx操纵JVM的内存限制 - Manipulating memory limit for JVM using Xmx 在jvm达到Xmx选项设置的最大堆大小之后,如何配置JVM堆内存大小以增加 - How to configure the JVM heap memory size to be increased after jvm reached the maximum heap size set by the Xmx option 为什么JVM不使用更多堆内存 - Why doesn't the JVM use more Heap Memory 增加 Java 服务器的堆大小(增加 JVM Memory 的 Z5F075AE3E1F9D1F0382 服务器) - Increase Heap Size for Java server (Increasing JVM Memory of Go Server) 为 memory 密集型应用程序增加 JVM 最大堆大小 - Increasing the JVM maximum heap size for memory intensive applications 通过Eclipse Java中的三种不同方法无法增加JVM堆内存 - Failure in increasing JVM heap memory by three different approaches in eclipse java 设置Xms Xmx时,Java Heap Space不会增加, - Java Heap Space doesn't increase when setting Xms Xmx ,
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM