I'd like to generate a list of Java class dependencies, similar to Ant's [depend](http://ant.apache.org/manual/Tasks/depend.html) task, without the limitations listed at the bottom of the aforementioned page.

Are there any decent source-code dependency analyzers for Java? I've tried writing my own but resolving references is very complicated.

**UPDATE**: I'd like to reuse the algorithm in my open-source project. Please provide libraries which are open-source compatible.