-help switch can be used to display the usage of ServiceWatcher. When -help is specified then the program will exit immediately after displaying the help in the console.
Implement this functionality in Main.java and do not clutter main method but encapsulate logic in a seperate method "checkHelpRequestedOnCommandLine"
Command line options parsing should be revisitted (no need to have a method for each switch we want to check). So consider a generic method that processes all current and future options.
-help switch can be used to display the usage of ServiceWatcher. When -help is specified then the program will exit immediately after displaying the help in the console.
Implement this functionality in Main.java and do not clutter main method but encapsulate logic in a seperate method "checkHelpRequestedOnCommandLine"
Command line options parsing should be revisitted (no need to have a method for each switch we want to check). So consider a generic method that processes all current and future options.