设置从 Eclipse 运行的 Java 程序的内存

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4175188/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 12:21:25  来源:igfitidea点击:

Setting memory of Java programs that runs from Eclipse

javaeclipsememory

提问by Guillaume Massé

I'm running a Java application from Eclipse that need a lot of memory.

我正在从 Eclipse 运行一个需要大量内存的 Java 应用程序。

Where can i put the -Xmms-xmsflag ?

我可以把国旗放在哪里?-Xmms-xms

采纳答案by aioobe

You can set the VM arguments for a specific run configuration:

您可以为特定的运行配置设置 VM 参数:

Run → Run Configurations... → Arguments Tab → VM arguments

运行 → 运行配置... → 参数选项卡 → VM 参数

Btw, you may want to try -Xmsinstead of -Xmms.

顺便说一句,您可能想尝试-Xms而不是-Xmms.

回答by Bivas

from the run menu select run configuration. you can add specific parameters to each of your run configurations individually.

从运行菜单中选择运行配置。您可以单独为每个运行配置添加特定参数。