From 0af87dbf1d7be8c5b20f4388d2c99b1d9012d875 Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Sun, 27 May 2007 20:17:58 +0000 Subject: [PATCH] Correct invocation --- doc/faq.xml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/faq.xml b/doc/faq.xml index 36e89fc..4be8740 100644 --- a/doc/faq.xml +++ b/doc/faq.xml @@ -26,17 +26,25 @@ To update the table of contents execute the following vim command from a registe
  • Can I create UML class diagrams from C++ code?
  • How can I get around a UMLGraphDoc crash with a ClassCastException?
  • Under what license is UMLGraph distributed?
  • +
  • Why do I get an exception java.lang.NoClassDefFoundError: com/sun/tools/javadoc/Main?
  • What is the command line sequence to generate a UMLGraph class diagram?

    Assuming that you diagram's description is in the file Diag.java, -issue the commands: +issue the command: -javadoc -docletpath absolute-path-to/UmlGraph.jar -package -doclet gr.spinellis.umlgraph.doclet.UmlGraph -output Diag.dot Diag.java +java -jar path-to/UmlGraph.jar -package -output - Diag.java | dot -Tpng -oDiag.png Diag.dot + +or + +javadoc -docletpath path-to/UmlGraph.jar -package -doclet gr.spinellis.umlgraph.doclet.UmlGraph -output Diag.dot Diag.java dot -Tpng -oDiag.png Diag.dot In the above you can change png to another file format, and add more UMLGraph switches before the -option switch. +

    +Note that the first format requires the file tools.jar +to be in the same directory as UmlGraph.jar.

    Why are the SVG diagrams dot generates malformed?

    @@ -211,4 +219,14 @@ license. This affects only the UMLGraph home page; all other material (for example the documentation) is also part of the UMLGraph distribution, and can therefore be used under the BSD license. + +

    Why do I get an exception java.lang.NoClassDefFoundError: com/sun/tools/javadoc/Main?

    +This exception will occur when you execute UMLGraph directly as a jar +(not throughjavadoc), and the files UmlGraph.jar and tools.jar +are not in the same directory. +Either copy UmlGraph.jar in the directory where the tools.jar +of the JDK distribution is located (and execute UmlGraph.jar from there), +or copy tools.jar to the directory where UmlGraph.jar is located. +(The file tools.jar is typically located in the lib directory +of your JDK distribution.)