Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphviz's dot tool on Windows

I've created a java program to write a .dot file as I'm using Graphviz software to visualize some data. There is nothing wrong with a code itself, but when I try to execute the following command in command prompt:

dot -Tpdf data.dot -o data.pdf

in a folder where my java code is located, I get the following error:

'dot' is not recognized as an internal or external command, operable program or batch file.

Sorry if the question was asked before, but the only similar question I found related to this problem is this one, however, it doesn't seem quite clear to me how could it be helpful in this particular case.

Any help would be appreciated. Regards.

like image 872
Bouhraoua Avatar asked Jan 13 '18 18:01

Bouhraoua


People also ask

Does Graphviz have GUI?

Mac. MacPorts* provides both stable and development versions of Graphviz and the Mac GUI Graphviz.app. These can be obtained via the ports graphviz, graphviz-devel, graphviz-gui and graphviz-gui-devel.


3 Answers

These days you could use chocolaty: choco install graphviz

That seems to add it to the path as part of the install

like image 157
Ben Avatar answered Sep 23 '22 05:09

Ben


You have to add the directory (folder) where you installed Graphviz to your PATH environment variable. How to do that depends on which version of Windows you have, but for start you can look at this answer on SuperUser.

like image 14
TheJavaGuy-Ivan Milosavljević Avatar answered Nov 09 '22 02:11

TheJavaGuy-Ivan Milosavljević


Be aware that Graphviz is a folder (container) which contains the "dot" executable. Therefore your modified PATH should lead to dot.py and not just the container Graphviz.

like image 1
Devin Avatar answered Nov 09 '22 03:11

Devin