I'm trying to make a program that can run with a gui or in a terminal only mode with no gui. How could I make it so that when the program is called in the terminal, the user adds an argument to determine whether to run with a gui or not?
By entering something like this when they start my program: java myprogram -Nogui