Class Visualizer

Free, interactive class diagrams generator from Java bytecode.

Frequently Asked Questions

  1. How can I run ClassVisualizer?
    - on Windows - by starting script: clsvis.bat
    - on Linux/MacOS/Unix - by starting script: clsvis.sh
    - by double-click on file clsvis.jar (Windows and MacOS) - not recommended

  2. How can I load classes to analyze?
    First, it's needed to add all required libraries to class path by choosing File -> Add To ClassPath... from the menu followed by choosing JAR file(s) or JARs root directory in the Open dialog. This step can be repeated many times until all libraries are added.
    Next, it's needed to load all required classes by choosing File -> Load Classes... from menu followed by choosing JAR file(s) or classes root directory in the Open dialog. This step can be repeated many times until all classes are loaded.
    It is also possible to provide classes to load as parameters. This solution is discussed in the following answer.

  3. Can I load classes automatically, i.e. from a command line?
    Yes. Start script accept parameters allowing automatic load of provided classes.
    - on Windows: clsvis.bat [-cp path_to_lib_1] [-cp path_to_lib_2] path_to_load_1 [path_to_load_2]
    - on Linux/MacOS/Unix: clsvis.sh [-cp path_to_lib_1] [-cp path_to_lib_2] path_to_load_1 [path_to_load_2]
    The invocation itself can be stored in a project-specific script file, i.e. my-project.bat/my-project.sh.
    Screenshots page contains commands loading sample projects.

  4. Can I load Maven-based application?
    Yes. The important step is to add Maven repository to the class path.
    Please see Screenshots page for an example of loading a Maven-based application.

  5. Can I load Ant-based application?
    Yes. The important step is to add root directory containing required libraries to the class path.
    Please see Screenshots page for an example of loading an Ant-based application.

  6. Can I load web application (WAR) and/or enterprise application (EAR)?
    Yes. Those applications, however, can be load only in unpacked form.
    For an enterprise application, each desired module (JAR) has to be specified separately for loading.
    For a web application/module, its classes directory has to be specified for loading.
    Please see Screenshots page for examples of loading web applications.

  7. Can I change Look and Feel of Class Visualizer?
    Yes. To do it, please look into the start script. There is the section Choose Look and Feel. There you can comment/uncomment lines within it in order to choose other supported look and feel.

  8. Class Visualizer ends up with OutOfMemoryError during loading a project. What should I do?
    It means, that the default memory settings are not enough for the size of a project. You can increase them in the start script in the section Memory.