Reverse Engineering in Rational Rose


By default, most computers are not setup so that Rational Rose (or any similar UML program) can successfully import GUI classes into class diagrams, as the program cannot "see" any of those little import files found within the AWT/Swing package. Here is a simple way to fix that, but be warned: editing your registry or your configuration files can render your system unusable. We will not be held liable if you break your system!

Without taking the following steps, you will get an "error resolving qualified name" message in Rational Rose or whichever UML program you are using. JVision and similar programs become less "intimate" with the GUI classes, so they need not "see" the GUI imports. The most obvious reason for this is because the CLASSPATH does not contain the path to the appropriate WFC .zip file.

The .zip files responsible for these components are located (at least on my machine) in C:\Windows\Java\Packages. Browse the .zip files with a .zip viewer such as WinZip to identify which ones contain the definitions for the includes you need. For this project, I added:

SET CLASSPATH=c:\Windows\Java\Packages\Tffh3r3v.zip;C:\Windows\Java\PAckages\29n3nhrd.zip;c:\Windows\Java\Packages\Ww4y1b7v.zip;c:\java\temp\

Notice the directory at the end. You may or may not be able to get the setup working correctly without that entry. To be on the safe side, add it. For an NT system. edit the user CLASSPATH variable in the System Control Panel.

When you run Rose next and follow the Java Reverse Engineering instructions, you will have eliminated most if not all "Resolving qualified name" errors.

Now according to the rules of Java, files that contain package declarations must be in a directory that is named after the package. This directory must be the subdirectory of a directory on the CLASSPATH. Periods in a package declaration resolve to path separators. So, if I have package com.rational.foo I must put that file in :

C:\work\JavaSrc\com\rational\foo

The simple way to ensure this is when you unzip the Java source files, make sure that you allow the unzipper to extract the files to the directories indicated by the extraction.

Finally, if you want special GUI components like TextField, TextArea, CheckBox, etc. to show up in your class diagrams, you need to make these registry changes:

  1. Go to start- run and type in regedit.
  2. Expand HKEY_LOCAL_MACHINE
  3. Expand SOFTWARE
  4. Expand Rational Software.
  5. Expand Rose
  6. Expand Add-ins
  7. Double click on the Java folder.
  8. Double click on Fundamental types on the right hand side and add the type you want.

(You should see boolean; char; byte; short; int; long; float; double)

------------------------

Jared Miniman

College of Engineering

Cornell University

jsm35@cornell.edu