Skip to content
Advertisement

How to set classpath in ant correctly?

I have my single dependency on path projectRoot/lib/jsoup.jar.

My build.xml is simple:

JavaScript

This doesn’t work, because jsoup.jar is not included in final AntDemo.jar.

EDIT When compile target is running the output has warning:

JavaScript

What does this warning mean?

Thank you!

Advertisement

Answer

When you compile classes and specify a classpath, the classes and other resources in that javac classpath don’t get copied over to the destination, in ant or in typical command line javac. You need to copy them over manually, or in ant with a copy or other means.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement