public static boolean isGraphvizAvailable() { final List<String> command = new ArrayList<>(); command.add("dot"); command.add("-V"); LOGGER.log(Level.INFO, new StringFormat("Checking if Graphviz is available:\n%s", command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); Integer exitCode; try { exitCode = processExecutor.call(); LOGGER.log(Level.INFO, new FileContents(processExecutor.getProcessOutput())); } catch (final Exception e) { LOGGER.log(Level.WARNING, "Could not execute Graphviz command", e); LOGGER.log(Level.WARNING, new FileContents(processExecutor.getProcessError())); exitCode = Integer.MIN_VALUE; } final boolean successful = exitCode != null && exitCode == 0; return successful; }
processExecutor.setCommandLine(command);
public static boolean isGraphvizAvailable() { final List<String> command = new ArrayList<>(); command.add("dot"); command.add("-V"); LOGGER.log(Level.INFO, new StringFormat("Checking if Graphviz is available:\n%s", command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); Integer exitCode; try { exitCode = processExecutor.call(); LOGGER.log(Level.INFO, new FileContents(processExecutor.getProcessOutput())); } catch (final Exception e) { LOGGER.log(Level.WARNING, "Could not execute Graphviz command", e); LOGGER.log(Level.WARNING, new FileContents(processExecutor.getProcessError())); exitCode = Integer.MIN_VALUE; } final boolean successful = exitCode != null && exitCode == 0; return successful; }
public static boolean isGraphvizAvailable() { final List<String> command = new ArrayList<>(); command.add("dot"); command.add("-V"); LOGGER.log(Level.INFO, new StringFormat("Checking if Graphviz is available:\n%s", command.toString())); final ProcessExecutor processExecutor = new ProcessExecutor(); processExecutor.setCommandLine(command); Integer exitCode; try { exitCode = processExecutor.call(); LOGGER.log(Level.INFO, new FileContents(processExecutor.getProcessOutput())); } catch (final Exception e) { LOGGER.log(Level.WARNING, "Could not execute Graphviz command", e); LOGGER.log(Level.WARNING, new FileContents(processExecutor.getProcessError())); exitCode = Integer.MIN_VALUE; } final boolean successful = exitCode != null && exitCode == 0; return successful; }
processExecutor.setCommandLine(command);
processExecutor.setCommandLine(command);