在日食中设置JVM参数的正确方法是什么? [英] what is the right way to set JVM param's in eclipse

查看:164
本文介绍了在日食中设置JVM参数的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用eclipse 4.2执行junit测试。
测试使用大量的内存,所以我想做的是放大分配给jvm的内存。我想知道在eclipse ini文件中设置堆内存参数和运行配置之间是否有区别?

解决方案

请注意,eclipse
启动的Java进程的内存设置与eclipse本身的最大允许内存大小不同。



eclipse本身的容限在启动时设置通过



-vmargs -Xmx1024M -Xms1024M -XX:PermSize = 2048m -XX:MaxPermSize = 2048m



请注意,mx中的m是区分大小写的,而1024M中的m是
不区分大小写;而单X选项拼写为=,但
双X选项拼写为=。



JVM的内存大小通过 eclipse启动,这是您想影响单元测试的一种方法,在 eclipse中设置



Window :: Preferences :: Java :: Installed JREs :: Edit :: Default Vm参数:
-Xms128M -Xmx2048M



(菜单项的精确标题可能因eclipse版本而异)。


i am using eclipse 4.2 to execute a junit test. the test uses a lot of memory so what i want to do is to enlarge the memory allocated to the jvm. i wanted to know if there is a differences between setting the heap memory param's in the eclipse ini file and the run configuration?

解决方案

Note the memory settings for Java processes started by eclipse are different from the maximum allowed memory size for eclipse itself.

The allowance for eclipse itself is set on startup by

-vmargs -Xmx1024M -Xms1024M -XX:PermSize=2048m -XX:MaxPermSize=2048m

Note that the m in "mx" is case sensitive, while the m in "1024M" is case insensitive; and the single-X options are spelt without "=", but the double-X options are spelt with "=".

The memory size for JVMs started by eclipse, which is what you want to influence unit tests, is set within eclipse:

Window::Preferences::Java::Installed JREs::Edit::Default Vm Arguments: -Xms128M -Xmx2048M

(Exact titles of menu entries may vary by eclipse version.)

这篇关于在日食中设置JVM参数的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆