user373201
user373201

Reputation: 11425

execute class in jar file with ant

I have a jar with the following structure

com
   merc
      test.class
lib
   xyz.jar
applicationContext.xml

test.class uses xyz.jar. Using ant java task, how do i include the lib folder in the classpath, so that I can execute test.class

Thanks

Upvotes: 0

Views: 1823

Answers (1)

Raghuram
Raghuram

Reputation: 52635

Did you try as documented here (like the snippet below) and if so, did you get any error?

<java classname="com.merc.test">
     <classpath>
         <pathelement location="lib/xyz.jar"/>
     </classpath>
</java>

Upvotes: 3

Related Questions