开发者

How to use java -cp command in Ant?

I have some jar files which are added in the CLASS_PATH of the batch process.So at the end of the batch process all I have to do is just to use java command shown belo开发者_Go百科w

java -cp %CLASS_PATH% com.web.MainClass arg1

I am planning to do the same thing using Ant. Any suggestion of how my target should look like?


You use the <java> Ant target. See docs.

For example:

<java classname="com.web.MainClass">
  <arg value="arg1"/>
  <classpath>
    <pathelement location="..."/>
    <pathelement location="..."/>
  </classpath>
</java>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜