I am trying to generate class diagram from the source code through UmlGraph. I have built and created the umlgraph.jar but while i am using it in my project it is giving me the below error ::
[javadoc] java.io.IOException: Cannot run program "dot": CreateProcess error=2, The system cannot find the file specified
[javadoc] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
[javadoc] at java.lang.Runtime.exec(Runtime.java:593)
[javadoc] at java.lang.Runtime.exec(Runtime.java:466)
[javadoc] at org.umlgraph.doclet.UmlGraphDoc.runGraphviz(UmlGraphDoc.java:131)
[javadoc] at org.umlgraph.doclet.UmlGraphDoc.generatePackageDiagrams(UmlGraphDoc.java:95)
[javadoc] at org.umlgraph.doclet.UmlGraphDoc.start(UmlGraphDoc.java:63)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:597)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
[javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
[javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:128)
[javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:41)
[javadoc] at com.sun.tools.javadoc.Main.main(Main.java:31)
I have downloaded the GraphViz and set the path for the graphviz. please help me guys i am new to this one.
The javadoc target in ant file ::
<fileset dir="${srcroot.dir}" >
<filename name="**/*.java"/>
</fileset>
<doclet name="org.umlgraph.doclet.UmlGraphDoc"
path="${umlLib.dir}/UmlGraph.jar">
<param name="-attributes" />
<param name="-operations" />
<param name="-qualify" />
<param name="-types" />
<param name="-visibility" />
</doclet>
</javadoc>
<apply executable="dot" dest="${reports.dir}" parallel="false">
<arg value="-Tpng"/>
<arg value="-o"/>
<targetfile/>
<srcfile/>
<fileset dir="${reports.dir}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
</apply>
</target>
I got the same "dot" message. http://sourceforge.net/p/schemaspy/discussion/462849/thread/38a9bfad/#7a89 indicates to restart your machine after installing GraphViz and adding it to your path. I did this and that did the trick.
将\\ graphviz-2.38 \\ release的路径添加到类路径中,您就完成了。
I had the common issues about the mysql-connector and the dot executable file. It's not necessary to restart the machine if you pass the correct value to -gv, believe me. I've installed the Graphviz and found the mysql-connector performing a sorted search of *.jar files.
The following lines are how I executed the statement.
java
-jar schemaSpy.jar
-t mysql
-o library
-host localhost
-db dummyDB
-u user
-p user
-dp C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\mysql-connector-java-commercial-5.1.22\mysql-connector-java-commercial-5.1.22-bin.jar
-gv "C:\Program Files (x86)\Graphviz2.38"
This requires installation of GraphViz. Information is available here. https://graphviz.gitlab.io/download/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.