} else if (myArgs[i].equals("-debug")) { OrbUtils.initializeClientForDebug();
    private void checkArgs(String[] myArgs) {        myLogger.debug("arg length = " + myArgs.length);        int myID = 0;        String xmlFile = null;        boolean wantsToRunCommandLine = false;        boolean wantsToRunGUI = false;        boolean wantsToRunController = false;        boolean wantsToRunUnreal = false;        boolean wantsToPhotosynthesis = false;        boolean wantsToRunSensorViewer = false;        boolean wantsToRunApollo13Viewer = false;        boolean wantsToRunPowerSchematic = false;        boolean wantsToRunSimpleController = false;        boolean unrealServerGiven = false;        String unrealServer = "";        for (int i = 0; i < myArgs.length; i++) {            if (myArgs[i].equals("gui")) {                wantsToRunGUI = true;            } else if (myArgs[i].equals("console")) {                wantsToRunCommandLine = true;            } else if (myArgs[i].equals("controller")) {                wantsToRunController = true;            } else if (myArgs[i].equals("simple-controller")) {            	wantsToRunSimpleController = true;            } else if (myArgs[i].equals("unreal")) {                wantsToRunUnreal = true;            } else if (myArgs[i].equals("photosynthesis")) {                wantsToPhotosynthesis = true;            } else if (myArgs[i].equals("sensor")) {            	wantsToRunSensorViewer = true;            } else if (myArgs[i].equals("apollo")) {            	wantsToRunApollo13Viewer = true;            } else if (myArgs[i].equals("power")) {            	wantsToRunPowerSchematic = true;            } else if (myArgs[i].equals("-debug")) {                OrbUtils.initializeClientForDebug();            } else if (myArgs[i].startsWith("-xml=")) {                try {                    xmlFile = myArgs[i].split("=")[1];                } catch (Exception e) {                    myLogger.error("Problem parsing arguments on arg "                            + myArgs[i]);                    e.printStackTrace();                }            }             else if ((myArgs[i].startsWith("-xml")) && (myArgs.length >= i)){                try {                    xmlFile = myArgs[i + 1];                } catch (Exception e) {                    myLogger.error("Problem parsing arguments on arg "                            + myArgs[i]);                    e.printStackTrace();                }            }             else if (myArgs[i].startsWith("-id=")) {                try {                    myID = Integer.parseInt(myArgs[i].split("=")[1]);                } catch (Exception e) {                    myLogger.error("Problem parsing arguments on arg "                            + myArgs[i]);                    e.printStackTrace();                }            }              else if ((myArgs[i].startsWith("-id")) && (myArgs.length >= i)){                try {                	myID = Integer.parseInt(myArgs[i + 1]);                } catch (Exception e) {                    myLogger.error("Problem parsing arguments on arg "                            + myArgs[i]);                    e.printStackTrace();                }            }             else if (myArgs[i].startsWith("-utServer=")) {                try {                    unrealServerGiven = true;                    unrealServer = myArgs[i].split("=")[1];                } catch (Exception e) {                    myLogger.warn("Problem parsing arguments on arg "                            + myArgs[i]);                    e.printStackTrace();                }            }              else if ((myArgs[i].startsWith("-utServer")) && (myArgs.length >= i)){                try {                    unrealServerGiven = true;                    unrealServer = myArgs[i + 1];                } catch (Exception e) {                    myLogger.error("Problem parsing arguments on arg "                            + myArgs[i]);                    e.printStackTrace();                }            }         }        if (xmlFile != null)            BioHolderInitializer.setFileAndID(myID, xmlFile);        else            BioHolderInitializer.setID(myID);        if (wantsToRunCommandLine)            runCommandLine(myID);        else if (wantsToRunGUI)            runGUI();        else if (wantsToPhotosynthesis)            runPhotosynthesis();        else if (wantsToRunController)            runHandController();        else if (wantsToRunSimpleController)            runSimpleController();        else if (wantsToRunSensorViewer)            runSensorViewer();        else if (wantsToRunApollo13Viewer)            runApollo13Viewer();        else if (wantsToRunPowerSchematic)            runPowerSchematic();        else if (wantsToRunUnreal) {            if (unrealServerGiven) {                runUnreal2(unrealServer);            } else {                runUnreal();            }        } else {            myLogger.info("Using default, starting GUI with server ID=" + myID);            runGUI();        }    }