private void finalSetup() throws GFLauncherException { if(installDir == null) installDir = GFLauncherUtils.getInstallDir(); if (!GFLauncherUtils.safeIsDirectory(installDir)) { throw new GFLauncherException("noInstallDir", installDir); } // check user-supplied args if (domainParentDir != null) { // if the arg was given -- then it MUST point to a real dir if (!GFLauncherUtils.safeIsDirectory(domainParentDir)) { throw new GFLauncherException("noDomainParentDir", domainParentDir); } } setupServerDirs(); if (!GFLauncherUtils.safeIsDirectory(configDir)) { throw new GFLauncherException("noConfigDir", configDir); } configFile = new File(configDir, CONFIG_FILENAME); if (!GFLauncherUtils.safeExists(configFile)) { throw new GFLauncherException("noConfigFile", configFile); } if (instanceName == null) { instanceName = "server"; } // if we made it here -- we're in pretty good shape! valid = true; }