在ant任务中指定jvm参数

use*_*672 1 java ant jvm-arguments

我正在指定jvm参数,因为我已经离开堆空间异常,所以只是为了避免我在我的ant目标中指定以下参数,如下所示.

  <junit
   printsummary="true"
   fork="yes"
   haltonfailure="false"
   failureproperty="junitsFailed"
   errorProperty="junitsFailed"
  >
   <jvmarg value=" -Xmx1024m -Duser.timezone=GMT0"/>
  </junit>
Run Code Online (Sandbox Code Playgroud)

但在下面我得到以下例外..

that is the invalid parameters are specified
Run Code Online (Sandbox Code Playgroud)

Cha*_*uis 8

使用多个<jvmarg>元素:

<junit printsummary="true" fork="yes" haltonfailure="false" failureproperty="junitsFailed" errorProperty="junitsFailed">
    <jvmarg value="-Xmx1024m"/>
    <jvmarg value="-Duser.timezone=GMT0"/>
</junit>
Run Code Online (Sandbox Code Playgroud)