1047N/A * The contents of this file are subject to the terms of the 1047N/A * Common Development and Distribution License, Version 1.0 only 1047N/A * (the "License"). You may not use this file except in compliance 1047N/A * You can obtain a copy of the license at 1047N/A * See the License for the specific language governing permissions 1047N/A * and limitations under the License. 1047N/A * When distributing Covered Code, include this CDDL HEADER in each 1047N/A * file and include the License file at 1047N/A * add the following below this CDDL HEADER, with the fields enclosed 1047N/A * by brackets "[]" replaced with your own identifying information: 1047N/A * Portions Copyright [yyyy] [name of copyright owner] 4576N/A * Copyright 2008-2009 Sun Microsystems, Inc. 6238N/A * Portions Copyright 2013 ForgeRock AS. 6302N/A * Portions Copyright 2013 Jens Elkner 1047N/A * Responsible for providing initial evaluation of command line arguments 1047N/A * and determining whether to launch a CLI, GUI, or print a usage statement. 1047N/A /** Arguments with which this launcher was invoked. */ 1047N/A * @param args String[] of argument passes from the command line 1907N/A * Gets the arguments with which this launcher was invoked. 1907N/A * @return String[] args from the CLI invocation 1907N/A * Gets an argument parser appropriate for this CLI launcher. 1907N/A * @return ArgumentParser for parsing args 1047N/A * Indicates whether or not the launcher should print a usage 1047N/A * statement based on the content of the arguments passed into 1047N/A * @return boolean where true indicates usage should be printed 2324N/A * Indicates whether or not the launcher should print a usage 2324N/A * statement based on the content of the arguments passed into 2324N/A * @return boolean where true indicates usage should be printed 1342N/A * Indicates whether or not the launcher should print a version 1342N/A * statement based on the content of the arguments passed into 1342N/A * @return boolean where true indicates version should be printed 1047N/A * Indicates whether the launcher will launch a command line versus 1047N/A * a graphical application based on the contents of the arguments 1047N/A * passed into the constructor. 1342N/A * @return boolean where true indicates that a CLI application 1697N/A * Prints a usage message to the terminal. 1697N/A * @param i18nMsg localized user message that will be printed to the terminal. 1697N/A * @param toStdErr whether the message must be printed to the standard error 1047N/A * Launches the graphical uninstall. The graphical uninstall is launched in a 1047N/A * different thread that the main thread because if we have a problem with the 1047N/A * graphical system (for instance the DISPLAY environment variable is not 1047N/A * correctly set) the native libraries will call exit. However if we launch 1047N/A * this from another thread, the thread will just be killed. 1047N/A * This code also assumes that if the call to SplashWindow.main worked (and 1047N/A * the splash screen was displayed) we will never get out of it (we will call 1047N/A * a System.exit() when we close the graphical uninstall dialog). 1047N/A * @param args String[] the arguments used to call the SplashWindow main 1047N/A * @return 0 if everything worked fine, or 1 if we could not display properly 3963N/A// Setup MacOSX native menu bar before AWT is loaded. 1047N/A * This is done to avoid displaying the stack that might occur if there are 1047N/A * problems with the display environment. 1047N/A /* An error occurred, so the return value will be -1. We got nothing to 1047N/A * Gets the frame title of the GUI application that will be used 1047N/A * in some operating systems. 1047N/A * @return internationalized String representing the frame title 1047N/A * Launches the command line based uninstall. 1047N/A * @param cliApp the CLI application to launch 1047N/A * @return 0 if everything worked fine, and an error code if something wrong 1697N/A * Prints the version statement to standard output terminal. 1342N/A * Prints a usage statement to terminal and exits with an error 1697N/A * @param toStdErr whether the message must be printed to the standard error 1047N/A * Creates a CLI application that will be run if the 1047N/A * launcher needs to launch a CLI application. 1047N/A * @return CliApplication that will be run 1047N/A * Called before the launcher launches the GUI. Here 1047N/A * subclasses can do any application specific things 1047N/A * like set system properties of print status messages 1047N/A * that need to be done before the GUI launches. 1047N/A * Called if launching of the GUI failed. Here 1047N/A * subclasses can so application specific things 1295N/A * @param logFileName the log file containing more information about why 1697N/A * The main method which is called by the command lines. 1531N/A // Add an extra space systematically