What's the best way to call an external program (graphviz's dot in this case) from a Java program and grab the output?
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.