diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/src/Ice/src/main/java/com/zeroc/Ice/PropertiesI.java | 3 | ||||
-rw-r--r-- | java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/PropertiesI.java b/java/src/Ice/src/main/java/com/zeroc/Ice/PropertiesI.java index 182bf331bcf..3ea0e3e3607 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/PropertiesI.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/PropertiesI.java @@ -315,10 +315,9 @@ public final class PropertiesI implements Properties if(System.getProperty("os.name").startsWith("Windows") && (file.startsWith("HKCU\\") || file.startsWith("HKLM\\"))) { - String regQuery = "reg query " + file; try { - java.lang.Process process = Runtime.getRuntime().exec(regQuery); + java.lang.Process process = Runtime.getRuntime().exec(new String[] { "reg", "query", file}); process.waitFor(); if(process.exitValue() != 0) { diff --git a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java index cfa4b8e28d2..22a8f990268 100644 --- a/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java +++ b/java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Coordinator.java @@ -3487,10 +3487,10 @@ public class Coordinator if(System.getProperty("os.name").startsWith("Windows")) { String regKey = "\"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\""; - String regQuery = "reg query " + regKey + " /v Personal"; try { - java.lang.Process process = Runtime.getRuntime().exec(regQuery); + java.lang.Process process = Runtime.getRuntime().exec( + new String[] {"reg", "query", regKey, "/v", "Personal"}); process.waitFor(); if(process.exitValue() != 0) { |