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>
精彩评论