eclipse 增加 -Xmx 时“无法创建 Java 虚拟机”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16761103/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"Could not create the Java Virtual Machine" when increasing the -Xmx
提问by Bennyz
The eclipse on my work computer was working with VM argument -Xms40m and -Xmx512m and it is really slow and freezes a lot, I wanted to increase it to -Xmx1024m, but every time I did so I got the error "Could not create the Java Virtual Machine".
我工作计算机上的日食正在使用 VM 参数 -Xms40m 和 -Xmx512m 并且它真的很慢并且冻结了很多,我想将它增加到 -Xmx1024m,但是每次我这样做时我都会收到错误“无法创建Java 虚拟机”。
The computer has 3.5GB RAM, WIN XP (32-bit), Java 1.6_18
电脑有3.5GB内存,WIN XP(32位),Java 1.6_18
What could be the reason? Is it related to other arguments?
可能是什么原因?它与其他论点有关吗?
UPDATE:I changed the -vm argument so it will use the jvm.dll that comes with the jrockit JDK and I was able to increase the max heap size to 1024m.
更新:我更改了 -vm 参数,因此它将使用 jrockit JDK 附带的 jvm.dll,并且我能够将最大堆大小增加到 1024m。
Also, on my home computer (WIN 7, 32-bit, 2GB RAM, java 1.7.0_21-b11), I was able to increase it 1024m as well.
此外,在我的家用计算机(WIN 7,32 位,2GB RAM,java 1.7.0_21-b11)上,我也能够将其增加 1024m。
回答by Iulian Dragos
The maximum amount of memory available on Windows 32-bit processes is (generally speaking) 2GB. That includes everything for your JVM, not only the application heap. People report various numbers for the maximum heap that can use for a 32-bit JVM, but 1200m
is a common figure. It seems to be lower for you. Best would be to switch to the 64-bit JVM, if you can.
Windows 32 位进程上可用的最大内存量(一般来说)为 2GB。这包括 JVM 的所有内容,而不仅仅是应用程序堆。人们报告了可用于 32 位 JVM 的最大堆的各种数字,但这1200m
是一个常见数字。对你来说似乎更低。如果可以,最好切换到 64 位 JVM。
Other questions:
其他问题: