Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 31646)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 31665)
@@ -26,4 +26,5 @@
 import java.awt.BorderLayout;
 import java.awt.Cursor;
+import java.awt.GraphicsEnvironment;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseEvent;
@@ -253,5 +254,5 @@
 		commands = (new Loader(getPluginDir())).load();
 		if (commands.isEmpty()) {
-			if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(Main.parent,
+			if (!GraphicsEnvironment.isHeadless() && JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(Main.parent,
 					tr("No command has been found. Would you like to download and install default commands now?"),
 					tr("No command found"), JOptionPane.YES_NO_CANCEL_OPTION)) {
