diff --git a/src/main/java/com/threerings/getdown/data/Application.java b/src/main/java/com/threerings/getdown/data/Application.java index f7db7b5..f3e0ce1 100644 --- a/src/main/java/com/threerings/getdown/data/Application.java +++ b/src/main/java/com/threerings/getdown/data/Application.java @@ -817,9 +817,7 @@ public class Application * If the application provided environment variables, combine those with the current * environment and return that in a style usable for {@link Runtime#exec(String, String[])}. * If the application didn't provide any environment variables, null is returned to just use - * the existing environment. If the application provided environment variables and this is - * running on Java 1.4 which can't find the existing environment, null is returned so the - * existing environment is used and things have a chance of running. + * the existing environment. */ protected String[] createEnvironment () { @@ -829,20 +827,12 @@ public class Application log.info("Didn't find any custom environment variables, not setting any."); return null; } - Map existing; - try { - existing = System.getenv(); - } catch (NoSuchMethodError nsme) { - log.warning("Unable to access the existing environment, most likely due to being on " - + "Java 1.4. Not setting application specific environment.", "applicationEnv", - envvar, nsme); - return null; - } + List envAssignments = new ArrayList(); for (String assignment : envvar) { envAssignments.add(processArg(assignment)); } - for (Entry environmentEntry : existing.entrySet()) { + for (Entry environmentEntry : System.getenv().entrySet()) { envAssignments.add(environmentEntry.getKey() + "=" + environmentEntry.getValue()); } String[] envp = envAssignments.toArray(new String[envAssignments.size()]);