diff --git a/src/gr/spinellis/umlgraph/doclet/UmlGraphDoc.java b/src/gr/spinellis/umlgraph/doclet/UmlGraphDoc.java index 9cbc6f6..7a5669f 100644 --- a/src/gr/spinellis/umlgraph/doclet/UmlGraphDoc.java +++ b/src/gr/spinellis/umlgraph/doclet/UmlGraphDoc.java @@ -128,16 +128,16 @@ public class UmlGraphDoc { File mapFile = new File(outputFolder, packageName.replace(".", "/") + "/" + name + ".map"); try { - /* - * Put filenames inside double quote characters to allow - * (typically Windows) files with embedded whitespace to - * work. This will still fail with Unix ` and $ characters, - * but it is better than nothing. - */ - String command = "dot -Tcmapx -o\"" + mapFile.getAbsolutePath() + "\" -Tpng -o\"" + - pngFile.getAbsolutePath() + "\" \"" + - dotFile.getAbsolutePath() + "\""; - Process p = Runtime.getRuntime().exec(command); + Process p = Runtime.getRuntime().exec(new String [] { + "dot", + "-Tcmapx", + "-o", + mapFile.getAbsolutePath(), + "-Tpng", + "-o", + pngFile.getAbsolutePath(), + dotFile.getAbsolutePath() + }); BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream())); String line = null; while((line = reader.readLine()) != null) diff --git a/src/org/umlgraph/doclet/UmlGraphDoc.java b/src/org/umlgraph/doclet/UmlGraphDoc.java index 9cbc6f6..7a5669f 100644 --- a/src/org/umlgraph/doclet/UmlGraphDoc.java +++ b/src/org/umlgraph/doclet/UmlGraphDoc.java @@ -128,16 +128,16 @@ public class UmlGraphDoc { File mapFile = new File(outputFolder, packageName.replace(".", "/") + "/" + name + ".map"); try { - /* - * Put filenames inside double quote characters to allow - * (typically Windows) files with embedded whitespace to - * work. This will still fail with Unix ` and $ characters, - * but it is better than nothing. - */ - String command = "dot -Tcmapx -o\"" + mapFile.getAbsolutePath() + "\" -Tpng -o\"" + - pngFile.getAbsolutePath() + "\" \"" + - dotFile.getAbsolutePath() + "\""; - Process p = Runtime.getRuntime().exec(command); + Process p = Runtime.getRuntime().exec(new String [] { + "dot", + "-Tcmapx", + "-o", + mapFile.getAbsolutePath(), + "-Tpng", + "-o", + pngFile.getAbsolutePath(), + dotFile.getAbsolutePath() + }); BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream())); String line = null; while((line = reader.readLine()) != null)