0

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

user373201
  • 10,945
  • 34
  • 112
  • 168

1 Answers1

3

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>
Raghuram
  • 51,854
  • 11
  • 110
  • 122
  • my classpath needs to have the jar file that contains com.merc.test, if there is a way to specify lib folder inside say mytest.jar than i can give it a try. – user373201 Nov 07 '10 at 06:04
  • I guess you need to add a manifest. http://stackoverflow.com/questions/682852/apache-ant-manifest-class-path gives some clues on ths. – Raghuram Nov 07 '10 at 06:15