}
}
- if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE) {
- if (!isTest) {
- try {
- System.out.println("Arguments from vm_launch.conf...");
- System.out.println();
- for (String str : LaunchConfig.readLaunchConfig(prop.getName())) {
- System.out.println(str);
- }
- System.out.println();
-
- prop.getWorker().launchVM(true, path);
- } catch (VMWorkerException e) {
- System.out.println("Error: Can not execute this VM."
- + StringResources.NEW_LINE
- + e.getMessage());
- return false;
- }
-
- System.out.println("Success: To start emulator is completed.");
+ if (isTest || EMLogger.getLogger().getLevel() == Level.WARNING) {
+ System.out.println("Print launch config file : "
+ + LaunchConfig.getLaunchConfigPath(prop.getName())
+ + StringResources.NEW_LINE);
+ for (String str : LaunchConfig.readLaunchConfig(prop.getName())) {
+ System.out.println(str);
}
+ System.out.println();
+ }
- } else {
- List<String> cmd;
+ if (!isTest) {
try {
- ILauncher launcher = prop.getWorker().getLauncher();
- if (launcher == null) {
- throw new VMWorkerException("Fail to get launcher");
- }
- cmd = launcher.getLaunchCommand(prop, path);
-
+ prop.getWorker().launchVM(true, path);
} catch (VMWorkerException e) {
- EMLogger.getLogger().log(Level.WARNING, "Failed to launch :" + e.getMessage());
- System.out.println("Error: " + "Failed to launch: " + e.getMessage());
+ System.out.println("Error: Can not execute this VM."
+ + StringResources.NEW_LINE
+ + e.getMessage());
return false;
}
- if (isTest || EMLogger.getLogger().getLevel() == Level.WARNING) {
- System.out.println("Arguments of emulator : ");
- String temp = cmd.get(0) + " ";
- for (String s : cmd.subList(1, cmd.size())) {
- temp += ("\"" + s + "\" ");
- }
- System.out.println(temp);
- System.out.println();
- }
-
- if (!isTest) {
- try {
- prop.getWorker().launchVM(true, null);
- } catch (VMWorkerException e) {
- System.out.println("Error: Can not execute this VM."
- + StringResources.NEW_LINE
- + e.getMessage());
- return false;
- }
-
- System.out.println("Success: To start emulator is completed.");
- }
+ System.out.println("Success: To start emulator is completed.");
}
+
+// if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE) {
+// if (!isTest) {
+// try {
+// System.out.println("Arguments from vm_launch.conf...");
+// System.out.println();
+// for (String str : LaunchConfig.readLaunchConfig(prop.getName())) {
+// System.out.println(str);
+// }
+// System.out.println();
+//
+// prop.getWorker().launchVM(true, path);
+// } catch (VMWorkerException e) {
+// System.out.println("Error: Can not execute this VM."
+// + StringResources.NEW_LINE
+// + e.getMessage());
+// return false;
+// }
+//
+// System.out.println("Success: To start emulator is completed.");
+// }
+//
+// } else {
+// List<String> cmd;
+// try {
+// ILauncher launcher = prop.getWorker().getLauncher();
+// if (launcher == null) {
+// throw new VMWorkerException("Fail to get launcher");
+// }
+// cmd = launcher.getLaunchCommand(prop, path);
+//
+// } catch (VMWorkerException e) {
+// EMLogger.getLogger().log(Level.WARNING, "Failed to launch :" + e.getMessage());
+// System.out.println("Error: " + "Failed to launch: " + e.getMessage());
+// return false;
+// }
+//
+// if (isTest || EMLogger.getLogger().getLevel() == Level.WARNING) {
+// System.out.println("Arguments of emulator : ");
+// String temp = cmd.get(0) + " ";
+// for (String s : cmd.subList(1, cmd.size())) {
+// temp += ("\"" + s + "\" ");
+// }
+// System.out.println(temp);
+// System.out.println();
+// }
+//
+// if (!isTest) {
+// try {
+// prop.getWorker().launchVM(true, null);
+// } catch (VMWorkerException e) {
+// System.out.println("Error: Can not execute this VM."
+// + StringResources.NEW_LINE
+// + e.getMessage());
+// return false;
+// }
+//
+// System.out.println("Success: To start emulator is completed.");
+// }
+// }
return true;
}