launcher/src/wombat/launcher/Wombat.java
public static void main(String[] args) {
		try {
			/**
			 * For this try
			 * 
			 * LICENSE:
			 * https://blogs.oracle.com/nickstephen/entry/java_redirecting_system_out_and
			 * 
			 * The code in this article is free for any use. I'd appreciate having a back-reference
			 * URL to the blog article in a comment in the code, but that's all. Thanks for the question! [ Nick ]
			 */

			// Initialize logging to go to rolling log file
	        LogManager logManager = LogManager.getLogManager();
	        logManager.reset();

	        // log file max size 10K, 3 rolling files, append-on-open
	        Handler fileHandler = new FileHandler("log", 10000, 3, true);
	        fileHandler.setFormatter(new SimpleFormatter());
	        Logger.getLogger("").addHandler(fileHandler);	

	        // Now rebind stdout/stderr to logger                                   
	        Logger logger;             
	        LoggingOutputStream los;                                                

	        logger = Logger.getLogger("stdout");                                    
	        los = new LoggingOutputStream(logger, StdOutErrLevel.STDOUT, System.out);           
	        System.setOut(new PrintStream(los, true));                              

	        logger = Logger.getLogger("stderr");                                    
	        los= new LoggingOutputStream(logger, StdOutErrLevel.STDERR, System.err);            
	        System.setErr(new PrintStream(los, true));                              

		} catch(Exception e) {
			e.printStackTrace();
		}
		
        // Verify installation, then launch.
		try {
			loadVersionFile();
			verifyFiles();
			launch();
		} catch(Exception e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(
					null, 
					"Unable to launch Wombat, please try again in a few minutes.\n" +
						"\n" + 
						(e.getMessage().length() > 0 ? "Reason:\n" + e.getMessage() : ""),
					"Unable to launch Wombat", JOptionPane.OK_OPTION);
			System.exit(0);
		}
		
		// Check for updates seperately, Wombat should work even if this fails.
		try {
			checkForUpdates();
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
/**
	 * Run from the command line.
	 * @param args Ignored.
	 */
Run from the command line.
@param args Ignored.
Run from the command line . @param args Ignored .
public static void main(String[] args) {
		try {
			/**
			 * For this try
			 * 
			 * LICENSE:
			 * https://blogs.oracle.com/nickstephen/entry/java_redirecting_system_out_and
			 * 
			 * The code in this article is free for any use. I'd appreciate having a back-reference
			 * URL to the blog article in a comment in the code, but that's all. Thanks for the question! [ Nick ]
			 */
	        LogManager logManager = LogManager.getLogManager();
	        logManager.reset();
	        Handler fileHandler = new FileHandler("log", 10000, 3, true);
	        fileHandler.setFormatter(new SimpleFormatter());
	        Logger.getLogger("").addHandler(fileHandler);	
	        Logger logger;             
	        LoggingOutputStream los;                                                
	        logger = Logger.getLogger("stdout");                                    
	        los = new LoggingOutputStream(logger, StdOutErrLevel.STDOUT, System.out);           
	        System.setOut(new PrintStream(los, true));                              
	        logger = Logger.getLogger("stderr");                                    
	        los= new LoggingOutputStream(logger, StdOutErrLevel.STDERR, System.err);            
	        System.setErr(new PrintStream(los, true));                              
		} catch(Exception e) {
			e.printStackTrace();
		}
		try {
			loadVersionFile();
			verifyFiles();
			launch();
		} catch(Exception e) {
			e.printStackTrace();
			JOptionPane.showMessageDialog(
					null, 
					"Unable to launch Wombat, please try again in a few minutes.\n" +
						"\n" + 
						(e.getMessage().length() > 0 ? "Reason:\n" + e.getMessage() : ""),
					"Unable to launch Wombat", JOptionPane.OK_OPTION);
			System.exit(0);
		}
		try {
			checkForUpdates();
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
public static void main ( String [ ] args ) { try { /**
			 * For this try
			 * 
			 * LICENSE:
			 * https://blogs.oracle.com/nickstephen/entry/java_redirecting_system_out_and
			 * 
			 * The code in this article is free for any use. I'd appreciate having a back-reference
			 * URL to the blog article in a comment in the code, but that's all. Thanks for the question! [ Nick ]
			 */ LogManager logManager = LogManager . getLogManager ( ) ; logManager . reset ( ) ; Handler fileHandler = new FileHandler ( "log" , 10000 , 3 , true ) ; fileHandler . setFormatter ( new SimpleFormatter ( ) ) ; Logger . getLogger ( "" ) . addHandler ( fileHandler ) ; Logger logger ; LoggingOutputStream los ; logger = Logger . getLogger ( "stdout" ) ; los = new LoggingOutputStream ( logger , StdOutErrLevel . STDOUT , System . out ) ; System . setOut ( new PrintStream ( los , true ) ) ; logger = Logger . getLogger ( "stderr" ) ; los = new LoggingOutputStream ( logger , StdOutErrLevel . STDERR , System . err ) ; System . setErr ( new PrintStream ( los , true ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } try { loadVersionFile ( ) ; verifyFiles ( ) ; launch ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; JOptionPane . showMessageDialog ( null , "Unable to launch Wombat, please try again in a few minutes.\n" + "\n" + ( e . getMessage ( ) . length ( ) > 0 ? "Reason:\n" + e . getMessage ( ) : "" ) , "Unable to launch Wombat" , JOptionPane . OK_OPTION ) ; System . exit ( 0 ) ; } try { checkForUpdates ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } }
Run from the command line.
Run from the command line .
// Initialize logging to go to rolling log file // log file max size 10K, 3 rolling files, append-on-open // Now rebind stdout/stderr to logger                                    // Verify installation, then launch. // Check for updates seperately, Wombat should work even if this fails.