Ans:There are several FREE/licensed plugins(tools) available in the market for creating UML diagram from existing java application (reverse engineering).I will describe one plugin which can be used on eclipse.Other plugins are almost similar in use.I will describe ‘EclipseUML’ plugin (http://www.omondo.com/) and the FREE version can be downloaded for testing purpose.I have used this tool with Java code base and eclipse IDE for generating UML class diagram from application packages.
Please follow the steps below
a) Download the FREE version ‘Eclipse 3.5.2 & EclipseUML Studio 2.2 package’ from (http://www.omondo.com/).
b) Extract the ZIP in a folder.
c) Open the ‘eclipse’ application and it will show you eclipse UML 2.2.
d) Import the java application packages.
e) Right click on the package which you want to use to create the UML diagram.Select ‘Open/Reverse UML’ and ‘Class diagram’.
f) On the next popup select relationship and scope.Click ‘OK’.
g) The class diagram will be generated automatically with selected relations.
h) Now right click on any class (on the right pane) and select ‘dependencies’,’inheritance’ and ‘association’.The linked classes or interfaces will be available on the menu itself to show the relationship on the diagram.
i) Please remember, the diagram will consider only the entities (classes,interfaces etc) within same project.
j) If you want to refer other projects then you have to include them in the build path of the first project.
This is the basic features available in the plugin. You can explore other features also during your UML modeling.
Feel free to contact me if you need any help