如何在 Eclipse 中增加 Java 应用程序的堆内存
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18097641/
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
How to increase heap memory of your java application in Eclipse
提问by Enrico
can anyone teach me how to increase your heap size using arguments like -Xms1024m -Xmx1024m? What is the difference of Program argument and VM argument?
谁能教我如何使用-Xms1024m -Xmx1024m 之类的参数来增加堆大小?Program 参数和 VM 参数有什么区别?
回答by Ajay George
If you go to Run -> Run Configuration in the Arguments Tab you will find the VM Arguments
section where you can add this.
如果您转到参数选项卡中的运行 -> 运行配置,您将找到VM Arguments
可以添加它的部分。
Sample Entry in VM Arguments
VM 参数中的示例条目
-Xms50M -Xmx128M
In Program Arguments
you mention the arguments which will be passed to the Main Class.
在Program Arguments
您提到将传递给主类的参数。
回答by Master
Go to the eclipse.ini file in Eclipse directory.
转到 Eclipse 目录中的 eclipse.ini 文件。
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130225-1645.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130228-0336
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms1152m
-Xmx1152m
and change
和改变
**openFile
-vmargs
-Xms1152m
-Xmx1152m**
accordingly.
因此。