Use varargs format
Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -51,8 +51,7 @@ public class LibreOfficeRenderer { | ... | @@ -51,8 +51,7 @@ public class LibreOfficeRenderer { |
51 | File outputFile = File.createTempFile("bfdcs-", "-tmpl"); | 51 | File outputFile = File.createTempFile("bfdcs-", "-tmpl"); |
52 | UtilIO.writeString(outputFile, output.toString()); | 52 | UtilIO.writeString(outputFile, output.toString()); |
53 | 53 | ||
54 | List<String> args = Arrays.asList(new String[]{"libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", "/tmp"}); | 54 | ProcessBuilder pb = new ProcessBuilder("libreoffice", "--headless", "--convert-to", "pdf", outputFile.getPath(), "--outdir", "/tmp"); |
55 | ProcessBuilder pb = new ProcessBuilder(args); | ||
56 | Map<String, String> env = pb.environment(); | 55 | Map<String, String> env = pb.environment(); |
57 | env.put("HOME", "/home/ofbiz"); | 56 | env.put("HOME", "/home/ofbiz"); |
58 | env.put("USERNAME", "ofbiz"); | 57 | env.put("USERNAME", "ofbiz"); | ... | ... |
-
Please register or sign in to post a comment