@@ -111,15 +111,15 @@ public class Execute {
// Ignore and keep try
// Ignore and keep try
}
}
if ( (new Os("mac")).eval( ) ) {
if ( Os.isFamily ("mac") ) {
// Mac
// Mac
shellLauncher = new MacCommandLauncher(new CommandLauncher());
shellLauncher = new MacCommandLauncher(new CommandLauncher());
}
}
else if ( (new Os("os/2")).eval( ) ) {
else if ( Os.isFamily ("os/2") ) {
// OS/2 - use same mechanism as Windows 2000
// OS/2 - use same mechanism as Windows 2000
shellLauncher = new WinNTCommandLauncher(new CommandLauncher());
shellLauncher = new WinNTCommandLauncher(new CommandLauncher());
}
}
else if ( (new Os("windows")).eval( ) ) {
else if ( Os.isFamily ("windows") ) {
// Windows. Need to determine which JDK we're running in
// Windows. Need to determine which JDK we're running in
CommandLauncher baseLauncher;
CommandLauncher baseLauncher;
@@ -203,13 +203,13 @@ public class Execute {
}
}
private static String[] getProcEnvCommand() {
private static String[] getProcEnvCommand() {
if ( (new Os("os/2")).eval( ) ) {
if ( Os.isFamily ("os/2") ) {
// OS/2 - use same mechanism as Windows 2000
// OS/2 - use same mechanism as Windows 2000
// Not sure
// Not sure
String[] cmd = {"cmd", "/c", "set" };
String[] cmd = {"cmd", "/c", "set" };
return cmd;
return cmd;
}
}
else if ( (new Os("windows")).eval( ) ) {
else if ( Os.isFamily ("windows") ) {
String osname =
String osname =
System.getProperty("os.name").toLowerCase(Locale.US);
System.getProperty("os.name").toLowerCase(Locale.US);
// Determine if we're running under 2000/NT or 98/95
// Determine if we're running under 2000/NT or 98/95
@@ -224,14 +224,18 @@ public class Execute {
return cmd;
return cmd;
}
}
}
}
else if ( (new Os("unix")).eval( ) ) {
else if ( Os.isFamily ("unix") ) {
// Generic UNIX
// Generic UNIX
// Alternatively one could use: /bin/sh -c env
// Alternatively one could use: /bin/sh -c env
String[] cmd = {"/usr/bin/env"};
String[] cmd = {"/usr/bin/env"};
return cmd;
return cmd;
}
else if ( Os.isFamily("netware") ) {
String[] cmd = {"env"};
return cmd;
}
}
else {
else {
// MAC OS 9 and previous, Netware
// MAC OS 9 and previous
// TODO: I have no idea how to get it, someone must fix it
// TODO: I have no idea how to get it, someone must fix it
String[] cmd = null;
String[] cmd = null;
return cmd;
return cmd;