Search code examples
javagraphviz

Calling Graphviz dot from Java


What's the best way to call an external program (graphviz's dot in this case) from a Java program and grab the output?


Solution

  • Runtime.exec() and ProcessBuilder do it. You use one of them to create your process, then call its getInputStream to get the output stream of the launched process.