automatically update reference jar file in classpath - ANT

pdidominic
pdidominic used Ask the Experts™
on
Hi,

I have a libs folder that contains the reference library jar files.I want to know whether it is possible to have an ant script that can list files in a dir and store the result in a property so that i dont have to hardcode the classpath.

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
You don't have to hardcode it, You can just use the directory and pattern as part of the classpath
Top Expert 2016
Commented:
e.g
    <path id="cp">
            <fileset dir="/oldhd/source/jackr/trunk/jackrabbit-api/target">
                    <include name="**/*.jar" />
            </fileset>
    </path>

Open in new window

Top Expert 2016

Commented:
:-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial