I have a Java project that currently has a lot of JARs in its libraries directory, which are all included in the resulting package when building. I know, however, that some
ClassDep (from Sun, in the Jini development kit) will do this for you.