-1

How to generate a UML class diagram for all the classes in a Java jar file?

user3527519
  • 31
  • 2
  • 3
  • 1
    -1 for not on-topic question, no research effort shown, e.g. Enterprise Architect can do it http://www.sparxsystems.com/resources/import_bin.html (found by Google for "enterprise architect reverse engineer jar") – xmojmr May 24 '14 at 07:48
  • Thanks. This is the info I needed. Good luck to Archer.. *...there is no tool that can generate a class diagram without the source... as compiled code is not readable...* – user3527519 May 24 '14 at 18:24

1 Answers1

1

Except for this tool that converts from your package explorer in Eclipse to a class hierarchy, I don't think there are any tools that convert from a .jar extension unless you first import the file and then generate the diagram.

ALSO: Eclipse plugin for generating a class diagram

EDIT AGAIN: If you want to generate the uml diagram, you need to use the source file, as the .jar file is a compilation of java files, usually in the form of .class compiled Java programs, as per the usual, developers that aren't developing open source don't like to propagate their source code. You can extract the contents of the .jar file and hope that the .java files are included, but if they aren't, you won't be able to generate a class diagram as it has already been translated into its low level byte code to be run on the virtual machine. If the .java files are included, you can generate a diagram using the tool linked, but otherwise, you won't be able to.

Community
  • 1
  • 1
Archibald
  • 456
  • 1
  • 7
  • 20