tags:

views:

572

answers:

16

Hi, Do you know any nice freeware that will take my java sources and will generate class diagrams from them?

A: 

It's called UML. Knowing that keyword, you should have more success in Google. If you're using an IDE like Eclipse, you can also look for a plugin here or here. Good luck.

BalusC
First of all thanks for your response.UML does not necessarily means class diagrams. Also not all UML freeware knows how to generate diagrams from existing java and not all freeware are that good. That's why I prefer to ask here instead of searching google.
Avi Y
A class diagram is one type of structure that can be modeled with Unified Modeling Language (UML).
Mark Robinson
+5  A: 
Pierre
Off-topic but I recently had an experience (no, that's not a punctuation error nor typo) with Jena, do you happen to be affiliated with it? :)
Esko
No, but I've played with the Jena API.
Pierre
Great job. Looks great I will download your code and see.
Kushal Paudyal
+4  A: 

Netbeans has a UML plugin that can reverse engineer class diagrams from Java source.

Mark
+2  A: 

StarUML

Andrew Mcveigh
+4  A: 

Doxygen can do that (with help from Graphviz).

Looks like there's a nice tutorial for installing and configuring it, including details about annotations to use for it, here.

JRL
+1  A: 

This may be more than what you asked for, but Doxygen use the "dot" tool from graphviz to generate class diagram along the documentation of any java application.

Regards,
Guillaume

PATRY
+1  A: 
spa
A: 

ArgoUML can create class diagrams from Java. However last time I used it (a fair time back now) it did not do all that great a job at laying it all out.

mlk
A: 

TopCoder UML Tool

Roman
A: 

If you use maven, one nice way of generating UML from your classes is by generating JavaDocs and adding the UMLGraph doclet. See the following link:

http://maven.apache.org/plugins/maven-javadoc-plugin/examples/alternate-doclet.html

The nice thing about this is that it becomes simple to integrate into a nightly build.

James Kingsbery
A: 

Slime is a neat small UML plugin for eclipse that can draw class diagrams.

rsp
A: 

AmaterasUML is a free eclipse plugin that works pretty well. You can drag and drop classes from the package explorer to the diagram, and export to png.

Jason Day
A: 

ArgoUML is the best free UML tool. MagicDraw is the best commercial UML tool. And IDEs have plugins to create UML diagrams too (Eclipse and Netbeans to name two).

Mark
+1  A: 

Try Hierarchy. (It does not auto-generate UML, but the source is available ...)

Dave Jarvis
+1  A: 

See http://www.reversejava.com for a dynamic reverse engineering application which generates UML Sequence diagram and view of Participating Class diagram from any Java Application at runtime All you have to do is just run your application and sit back. Reverse Java runs in background tracing all the activities happening inside your application and creates UML diagram for you.

You also have options for, excluding packages,editing the Sequence diagram and exporting the diagrams as PDF or Image.

And its not expensive !

Rajesh Jadhav
A: 

I use the ObjectAID UML plugin for eclipse. It's a very nice free tool that lets you build UML diagrams that you can navigate.

See also this question for more Eclipse plugins that allow you to do this with UML.

Dean Povey