在 ant 任务中指定 jvm 参数

在 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

使用多个 元素:

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