// check if console is attached to the process
if (System.console() != null) {
System.err.println(usageText);
}
else {
InfoDialog dialog = new InfoDialog(Version.NAME, Labels.getLabel("title.commandline"));
dialog.setMessage(usageText);
dialog.open();
}
}