I've created a Java program to write a .dot file as I'm using the 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.
How can I fix this?
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.
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 a start, you can look at this answer on Super User.