cmdStop = cmdGeneral + " " +dir + "smartfrog" + " -a " +"\""+ this.processNameTextField.getText() +"\""+":" +cmdSFStop+":" +""+":" +":" + this.hostNameTextField.getText() + ": -e";
   public void runSFProcess(String sfFilePath) {      if (sfFilePath != null) {         try {            String osName = System.getProperty("os.name");            //System.out.println("runSFProcess:osNAME:"+osName);            String cmdGeneral = "";            String batchDir = "bin";            String dir = "";            String cmdStart = cmdSFStart;            String cmdStop = cmdSFStop;            if (this.securityCheckBox.isSelected()) {               cmdStart = cmdStart + this.cmdAddSecurity;               cmdStop = cmdStop + this.cmdAddSecurity;            }            if (osName.equals("Windows 2000") || osName.equals("Windows NT")|| osName.equals("Windows XP")) {               cmdGeneral = "cmd.exe /C";               dir = ".\\" + batchDir + "\\";            } else if (osName.equals("Windows 95") || osName.equals("Windows 98")) {               cmdGeneral = "command.exe /C";               dir = ".\\" + batchDir + "\\";            } else {               cmdGeneral = "bash";               dir = "./" + batchDir + "/";            }          String switchOption ="-a";          if (sfFilePath.endsWith(".sfcd")){            cmdStart = cmdGeneral + " " + dir + "smartfrog" + " -f "                  + sfFilePath + " -e";          } else {           cmdStart = cmdGeneral + " " + dir + "smartfrog" + " -a "                  +"\""+ this.processNameTextField.getText() +"\""+":"                  +cmdSFStart+":"                  +"\""+ sfFilePath+"\""+":"                  +":"                  + this.hostNameTextField.getText() + ": -e";          }              cmdStop = cmdGeneral + " " +dir + "smartfrog" + " -a "                     +"\""+ this.processNameTextField.getText() +"\""+":"                     +cmdSFStop+":"                     +""+":"                     +":"                     + this.hostNameTextField.getText() + ": -e";            jTabbedPanelNorth.setSelectedIndex(jTabbedPanelNorth.indexOfTab("output"));            //jTabbedPanelNorth.setSelectedIndex(2);            auxProcess = new InfoProcess(this.processNameTextField.getText() + "(" + this.hostNameTextField.getText() + ")", cmdStart, " ", cmdStop, " ", ".", null);            auxProcess.start();            this.processPanel.mngProcess.addProcess(auxProcess, true);            log("Process Running: " + "" + auxProcess.getProcessName(), "runSFProcess", 3);            this.processPanel.refresh();            output.requestFocus();         } catch (Exception ex) {            log(ex.getMessage(), "runProcess", 5);            ex.printStackTrace();         }      }   }