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.
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.
These days you could use chocolaty: choco install graphviz
That seems to add it to the path as part of the install
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With