Abdul Ahmad
Abdul Ahmad

Reputation: 10021

does package need to be in jar for ant build script

does a java package need to be packaged into a jar for ANT to see it on the classpath or can it just be a regular folder structure/directory with .class files?

Upvotes: 0

Views: 45

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1503290

You can just leave the class files in file system directories - but as normal, that directory hierarchy should match the package structure of the classes.

Basically, an Ant classpath is just like a classpath in a normal Java tool - just with fancier features such as property substitution. Ultimately in most cases it'll be passed to a normal Java tool in just the same way as you'd specify it on a command-line, so anything that's supported on the command-line is likely to work in Ant too.

Upvotes: 2

Related Questions