Changeset 62
- Timestamp:
- 02/08/10 22:44:42 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/ecj/framsticks/FramsticksUtils.java
r61 r62 91 91 try { 92 92 File f = new File(directoryPath); 93 Process p = Runtime.getRuntime().exec( 94 new String[] { "cmd.exe", "/C", directoryPath + command }, null, f); 93 94 String[] cmd; 95 String os = System.getProperty("os.name"); 96 if(os.contains("Linux")) 97 { 98 cmd = new String[] { "/bin/bash", "-c", directoryPath + command }; 99 } 100 else if(os.contains("Windows")) 101 { 102 cmd = new String[] { "cmd.exe", "/C", directoryPath + command }; 103 } 104 else 105 { 106 throw new Exception("Not supported OS"); 107 } 108 109 Process p = Runtime.getRuntime().exec(cmd, null, f); 110 95 111 BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); 96 112 result = readInput(input); … … 105 121 return result; 106 122 } 107 123 108 124 private void saveToFile(String filePath, String contents) { 109 125 try {
Note: See TracChangeset
for help on using the changeset viewer.