Importing Jar files - dwagelaar/jar2uml GitHub Wiki
Importing Jar files
Before you import a Jar file as a UML model, the target project in which you want to save the UML model must exist! You can create a new project by selecting “File → New → Project…” Any kind of project will do for Jar2UML
- Start by selecting “File → Import…” in the Eclipse menu.
- Select “Jar2UML Import → Import Jar Files to UML Models” and click “Next”.
- The Jar2UML Import Wizard dialog appears.
- At “Select Jar File(s):”, select the jar files you want to reverse engineer to UML.
- At “Select Classpath Jar File(s):”, select the jar files that you want to conditionally reverse engineer to UML. Classes in a “classpath” jar file are only reverse engineered if they are referenced by another class file that is already reverse engineered. As such, the transitive closure of referenced class files in the classpath jars will be reverse engineered.
- At “Enter or select the parent folder”, select the folder in the workspace where you want to save your UML model.
- At “New File Name:”, choose a file name for your UML model.
- If the UML model already exists, a warning is displayed, and an option to update the existing model becomes available. Check the option to keep the existing UML model and update its contents. Leave the option unchecked to overwrite the UML model.
- If you don't want to import operations and attributes, then uncheck the “Include operations and attributes” option.
- If you only want to import packages starting with “java”, “org.omg”, “org.ietf”, “org.w3c” or “org.xml”, then select “Only Java API packages”. You only want this when reverse engineering the Java class library itself!
- By default, only named public and protected elements are imported. To include all elements, select “Include anonymous and private elements”.
- Jar2UML has to introduce references to dependencies in the UML model to provide an accurate model of the jar file. If you want Jar2UML to exhaustively search for dependencies in the bytecode instructions themselves, select “Include elements referenced by bytecode instructions”.
- Click “Finish” to create the UML model from the selected jar files.
If you also have UML2Tools installed, you can right-click the generated UML model and select “Initialize …_diagram file” to create a visual representation for the UML model.