2
I am trying to generate a graph from a . dot file using the Graphviz tool. To do so, inside a Java application, I am invoking the command prompt, navigating to the Graphviz installation folder and inserting the command, as follows::
String cd= "cd C:\\Program Files (x86)\\Graphviz2.36\\bin";
String comando = " dot -Tpng (...)saidaDot.dot -o (..)out.png ";
Runtime.getRuntime().exec( "cmd.exe /C start cmd.exe /C "+cd+comando);
Where (...) symbolizes the file directory.
Command prompt opens and closes quickly and I was unsuccessful in file generation out png..
Does anyone have any idea where my mistake might be?
Thank you so much for the @Kyllopardiun reply, now it worked. I just had to make a change to the line:
String cmdString = graphDir + arquivoDot + " -o " + arquivoPNG;
Now it worked perfectly.– Natanael Ramos