您的位置:首页 > 运维架构 > Linux

[Ant]Solutions of outOfMemory when run ant

2011-09-08 14:57 288 查看
there are 2  solutions:
1、in linux server, edit ant:
  java -Xms128m -Xmx256m -classpath "%ANTCLASSPATH%" org.apache.tools.ant.Main %ANT_ARGS%

ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
change to
ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -Xms128m -Xmx512m -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher
$ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
 
2、when you run ant in eclipse, configure parameter follow as:
in build.xml  right-hand button->Run as->Extenal Tools Configurations->JRE Vmargument  add
-Xms128m -Xmx512m there, you can solve this problem.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息