@ SuppressWarnings ( "unchecked" ) private static void printUsage ( final Exception e ) { printVersion ( ) ; if ( e != null ) { System . out . println ( e . getMessage ( ) + "\n" ) ; } HelpFormatter hf = new HelpFormatter ( ) ; StringBuilder sbDivider = new StringBuilder ( "=" ) ; while ( sbDivider . length ( ) < hf . getPageWidth ( ) ) { sbDivider . append ( "=" ) ; } // DISPLAY SETTING hf . getDisplaySettings ( ) . clear ( ) ; hf . getDisplaySettings ( ) . add ( DisplaySetting . DISPLAY_GROUP_EXPANDED ) ; hf . getDisplaySettings ( ) . add ( DisplaySetting . DISPLAY_PARENT_CHILDREN ) ; // USAGE SETTING hf . getFullUsageSettings ( ) . clear ( ) ; hf . getFullUsageSettings ( ) . add ( DisplaySetting . DISPLAY_PARENT_ARGUMENT ) ; hf . getFullUsageSettings ( ) . add ( DisplaySetting . DISPLAY_ARGUMENT_BRACKETED ) ; hf . getFullUsageSettings ( ) . add ( DisplaySetting . DISPLAY_PARENT_CHILDREN ) ; hf . getFullUsageSettings ( ) . add ( DisplaySetting . DISPLAY_GROUP_EXPANDED ) ; hf . setDivider ( sbDivider . toString ( ) ) ; hf . setGroup ( configureCommandLine ( ) ) ; hf . print ( ) ; System . exit ( 0 ) ; }
Prints the JNRPE Server usage and eventually the error about the last invocation .