3 import java.io.IOException;
4 import java.sql.SQLException;
6 import java.util.logging.Level;
7 import java.util.logging.Logger;
13 public class CommandController {
15 public CommandController(){
19 public boolean CommandSelector(String com) throws IOException, SQLException, ClassNotFoundException{
20 UserTaskModel utaskmodel = new UserTaskModel();
21 UserTaskView utaskview = new UserTaskView();
22 VirtualMachineModel vmmodel = new VirtualMachineModel();
23 VirtualMachineView vmview = new VirtualMachineView();
25 String comlist[] = com.split(" ");
28 String head = comlist[0];
30 String arg[] = new String[comlist.length-1];
33 for (int i = 0;i < comlist.length-1; i++) {
34 arg[i] = comlist[i+1];
37 if(head.equals("mktask")){
38 utaskmodel.makeTask(arg);
39 } else if(head.equals("rmtask")){
41 } else if(head.equals("lstask")){
42 utaskview.showTaskList();
43 } else if(head.equals("lsvm")){
45 } else if(head.equals("vmrun")){
47 } else if(head.equals("isa")){
48 vmmodel.checkVMP("1");
49 } else if(head.equals("test")){
54 new TaskCenterPanel();
55 } else if(head.equals("exit") || head.equals("quit")){
58 System.out.println("command not found.");