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.
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.