[java] Generate UML Class Diagram from Java Project

Is there a good tool that can help to reverse engineer Java classes to UML that will show an overview of how my classes are related to each other? It doesn't need to decompile from JAR file because I have the sources. I know there are quite a few out there but most of those can only generate individual class. I hope there is a tool that can generate class diagram that shows an overview of how all my current classes and packages work together, so that I can analyse my current architecture design. Of course, analysing is one thing. The other is for documentation purposes.

I know of a few so far. But they cannot do an overview class diagram. Here's a list of Java UML tool that I have tried and is capable of doing reverse engineer but cannot do an overview class diagram of my whole project:

  • StarUML (Really good Opensource UML tool but cannot generate not overview class diagram)
  • ArgoUML (It is slow and sluggish and it keeps crashing)
  • UModel (This is a commerical software. I used before some time ago but found it difficult to use)
  • MS Visio (It doesn't support Java UML reverse engineer. Only for VB)

Are there any other recommendations to add to this list? And hopefully, can generate an overview Java class diagram. I am using Eclipse, by the way.

This question is related to java uml reverse-engineering class-diagram

The answer is


How about the Omondo Plugin for Eclipse. I have used it and I find it to be quite useful. Although if you are generating diagrams for large sources, you might have to start Eclipse with more memory.


I wrote Class Visualizer, which does it. It's free tool which has all the mentioned functionality - I personally use it for the same purposes, as described in this post. For each browsed class it shows 2 instantly generated class diagrams: class relations and class UML view. Class relations diagram allows to traverse through the whole structure. It has full support for annotations and generics plus special support for JPA entities. Works very well with big projects (thousands of classes).


I´d say MoDisco is by far the most powerful one (though probably not the easiest one to work with).

MoDisco is a generic reverse engineering framework (so that you can customize your reverse engineering project, with MoDisco you can even reverse engineer the behaviour of the java methods, not only the structure and signatures) but also includes some predefined features like the generation of class diagrams out of Java code that you need.


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to uml

UML diagram shapes missing on Visio 2013 Use IntelliJ to generate class diagram How to show "if" condition on a sequence diagram? Eclipse plugin for generating a class diagram Generate UML Class Diagram from Java Project How to use doxygen to create UML class diagrams from C++ source Explanation of the UML arrows What's is the difference between include and extend in use case diagram? What is the difference between aggregation, composition and dependency? What is the difference between association, aggregation and composition?

Examples related to reverse-engineering

Sniffing/logging your own Android Bluetooth traffic What is the iBeacon Bluetooth Profile JNZ & CMP Assembly Instructions Best practice for storing and protecting private API keys in applications How to avoid reverse engineering of an APK file? Generate UML Class Diagram from Java Project How do you extract classes' source code from a dll file? Generate ER Diagram from existing MySQL database, created for CakePHP decompiling DEX into Java sourcecode List of all index & index columns in SQL Server DB

Examples related to class-diagram

How to generate Class Diagram (UML) on Android Studio (IntelliJ Idea) Use IntelliJ to generate class diagram Eclipse plugin for generating a class diagram Generate UML Class Diagram from Java Project How to use doxygen to create UML class diagrams from C++ source In UML class diagrams, what are Boundary Classes, Control Classes, and Entity Classes? PHP UML Generator