I need to add a folder in current classpath for ant script that I have written for running java files. How can it be done?
You could add it as an attribute
<java classpath="${extraDir}"
classname="pkg.Class">
...
</java>
Or using the nested <classpath>
tag:
<java classname="pkg.Class">
<classpath>
<pathelement path="${extraDir}"/>
</classpath>
</java>
See the documentation for the Java task .
i added the following line in the tag of the task and it ran successfully.
<pathelement path="C:\JunitTest\folderIsHere"/>
and after this the script ran successfully.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.