| | |
| | | */ |
| | | protected void printUsage(String i18nMsg) { |
| | | System.err.println(i18nMsg); |
| | | System.exit(QuickSetupCli.USER_DATA_ERROR); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * The main method which is called by the uninstall command lines. |
| | | * @return int exit code that should be returned upon exit of this program |
| | | */ |
| | | public int launch() { |
| | | int exitCode = 0; |
| | | public void launch() { |
| | | if (shouldPrintUsage()) { |
| | | printUsage(); |
| | | exitCode = QuickSetupCli.USER_DATA_ERROR; |
| | | } else if (isCli()) { |
| | | exitCode = launchCli(args, createCliApplication()); |
| | | int exitCode = launchCli(args, createCliApplication()); |
| | | if (exitCode != 0) { |
| | | System.exit(exitCode); |
| | | } |
| | | } else { |
| | | willLaunchGui(); |
| | | exitCode = launchGui(args); |
| | | int exitCode = launchGui(args); |
| | | if (exitCode != 0) { |
| | | guiLaunchFailed(); |
| | | exitCode = launchCli(args, createCliApplication()); |
| | | if (exitCode != 0) { |
| | | System.exit(exitCode); |
| | | } |
| | | } |
| | | } |
| | | return exitCode; |
| | | } |
| | | |
| | | /** |