开发者

How to use java -cp command in Ant?

开发者 https://www.devze.com 2023-02-04 12:31 出处:网络
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

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

精彩评论

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

关注公众号