| Author |
Write an ant task to check if a file exists
|
Garandi Garandi
Ranch Hand
Joined: Jan 07, 2003
Posts: 192
|
|
I am new to ant. How to write a task to see if a .jar file is in a given location, if its there, then whether or not a given .class file is in it? What ant tutorial do you recommand. Thank you Garandi
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Ant has an <avaliable /> task which checks if a resource is there. You can use this to test if your jar exists. Also it can be used to check whether a particular class is in the classpath. So though you can't check the contents of a jar directly, you can handle ClassDefNotFound exceptions a little more helpfully.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Write an ant task to check if a file exists
|
|
|