public static ServerEnvironment determineEnvironment(String[] args, Properties systemProperties, Map<String, String> systemEnvironment, ServerEnvironment.LaunchType launchType) {
final int argsLength = args.length;
String serverConfig = null;
String initialServerConfig = null;
RunningMode runningMode = RunningMode.NORMAL;
ProductConfig productConfig;
for (int i = 0; i < argsLength; i++) {
final String arg = args[i];
try {
if (CommandLineConstants.VERSION.equals(arg) || CommandLineConstants.SHORT_VERSION.equals(arg)