Suppose you want to:
In these circumstances, it is vital that programs can be run without a graphical interface or any user interaction, and can be started up from a command line.
Whenever you write a Java application, you should consider whether there are useful jobs that it could do offline. If so, you should provide a feature which switches off the GUI and specifies non-interactively what the program should do.