在ant任务中指定jvm参数 [英] Specifying jvm arguments in ant tasks

查看:398
本文介绍了在ant任务中指定jvm参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要指定jvm参数是因为我要摆脱堆空间异常,所以只是为了避免在我的ant目标中指定以下参数,如下所示.

I am specifying jvm arguments since i was getting out of heap space exception so just to avoid that i was specifying the below parameters in my ant target that is as shown below..

  <junit
   printsummary="true"
   fork="yes"
   haltonfailure="false"
   failureproperty="junitsFailed"
   errorProperty="junitsFailed"
  >
   <jvmarg value=" -Xmx1024m -Duser.timezone=GMT0"/>
  </junit>

但是在下面,我得到了以下异常..

but below i am getting the below exception ..

that is the invalid parameters are specified

推荐答案

使用多个<jvmarg>元素:

<junit printsummary="true" fork="yes" haltonfailure="false" failureproperty="junitsFailed" errorProperty="junitsFailed">
    <jvmarg value="-Xmx1024m"/>
    <jvmarg value="-Duser.timezone=GMT0"/>
</junit>

这篇关于在ant任务中指定jvm参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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