I want to either display a message in the console or a pop up, so in case a parameter is not specified, I want to know to which should I display
Something like:
You can try with:
if (System.console() != null) { // Console attached to the JVM: command prompt output System.out.println("..."); } else { // No console: use Swing }