1 37 package net.sourceforge.cruisecontrol.sourcecontrols; 38 39 import java.util.Iterator ; 40 import java.util.Properties ; 41 42 46 public final class VSSHelper { 47 48 private VSSHelper() { 49 50 } 51 52 public static String [] loadVSSEnvironment(String serverPath) { 53 Properties systemProps = System.getProperties(); 54 if (serverPath != null) { 55 systemProps.put("SSDIR", serverPath); 56 } 57 String [] env = new String [systemProps.size()]; 58 59 int index = 0; 60 Iterator systemPropIterator = systemProps.keySet().iterator(); 61 while (systemPropIterator.hasNext()) { 62 String propName = (String ) systemPropIterator.next(); 63 env[index] = propName + "=" + systemProps.get(propName); 64 index++; 65 } 66 67 return env; 68 } 69 70 } 71 | Popular Tags |