public static void handleCommands() throws Exception { if (commandMap.get("test") != null) { String batFileName = commandMap.get("test"); if (existsInFileSystem(batFileName, false)) mainFrame.setBatFilePath(batFileName); else throw new Exception(batFileName + " is not a file"); } if (commandMap.get("run") != null) { String runBatFileName = commandMap.get("run"); if (existsInFileSystem(runBatFileName, false)) mainFrame.setRunBatFilePath(runBatFileName); else throw new Exception(runBatFileName + " is not a file"); } if (commandMap.get("folder") != null) { String experimentFilesFolder = commandMap.get("folder"); if (existsInFileSystem(experimentFilesFolder, true)) mainFrame.setExperimentFilesFolderPath(experimentFilesFolder); else throw new Exception(experimentFilesFolder + " is not a folder"); } }