+ /**
+ * Check to see that the JVM version being run is suitable for the Java
+ * version this Jalview was compiled for. Popup a warning if not.
+ */
+ if (!LaunchUtils.checkJavaVersion())
+ {
+ Console.warn("The Java version being used (Java "
+ + LaunchUtils.getJavaVersion()
+ + ") may lead to problems. This installation of Jalview should be used with Java "
+ + LaunchUtils.getJavaCompileVersion() + ".");
+
+ if (!LaunchUtils
+ .getBooleanUserPreference("IGNORE_JVM_WARNING_POPUP"))
+ {
+ Object[] options = {
+ MessageManager.getString("label.continue") };
+ JOptionPane.showOptionDialog(null,
+ MessageManager.formatMessage(
+ "warning.wrong_jvm_version_message",
+ LaunchUtils.getJavaVersion(),
+ LaunchUtils.getJavaCompileVersion()),
+ MessageManager
+ .getString("warning.wrong_jvm_version_title"),
+ JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
+ null, options, options[0]);
+ }
+ }
+
+ boolean webservicediscovery = bootstrapArgs
+ .getBoolean(Arg.WEBSERVICEDISCOVERY);
+ if (aparser.contains("nowebservicediscovery"))
+ webservicediscovery = false;
+ if (webservicediscovery)
+ {
+ desktop.startServiceDiscovery();
+ }
+ else
+ {
+ testoutput(argparser, Arg.WEBSERVICEDISCOVERY);
+ }
+
+ boolean usagestats = !bootstrapArgs.getBoolean(Arg.NOUSAGESTATS);
+ if (aparser.contains("nousagestats"))
+ usagestats = false;
+ if (usagestats)
+ {
+ startUsageStats(desktop);
+ testoutput(argparser, Arg.NOUSAGESTATS);
+ }
+ else
+ {
+ System.out.println("CMD [-nousagestats] executed successfully!");
+ testoutput(argparser, Arg.NOUSAGESTATS);
+ }
+
+ boolean questionnaire = bootstrapArgs.getBoolean(Arg.QUESTIONNAIRE);
+ if (aparser.contains("noquestionnaire"))
+ questionnaire = false;
+ if (questionnaire)
+ {
+ String url = aparser.getValue("questionnaire");
+ if (url != null)
+ {
+ // Start the desktop questionnaire prompter with the specified
+ // questionnaire
+ Console.debug("Starting questionnaire url at " + url);
+ desktop.checkForQuestionnaire(url);
+ System.out.println("CMD questionnaire[-" + url
+ + "] executed successfully!");
+ }
+ else
+ {
+ if (Cache.getProperty("NOQUESTIONNAIRES") == null)
+ {
+ // Start the desktop questionnaire prompter with the specified
+ // questionnaire
+ // String defurl =
+ // "http://anaplog.compbio.dundee.ac.uk/cgi-bin/questionnaire.pl";
+ // //
+ String defurl = "https://www.jalview.org/cgi-bin/questionnaire.pl";
+ Console.debug(
+ "Starting questionnaire with default url: " + defurl);
+ desktop.checkForQuestionnaire(defurl);
+ }
+ }
+ }
+ else
+ {
+ System.out
+ .println("CMD [-noquestionnaire] executed successfully!");
+ testoutput(argparser, Arg.QUESTIONNAIRE);
+ }
+
+ if ((!aparser.contains("nonews")
+ && Cache.getProperty("NONEWS") == null
+ && !"false".equals(bootstrapArgs.getValue(Arg.NEWS)))
+ || "true".equals(bootstrapArgs.getValue(Arg.NEWS)))
+ {
+ desktop.checkForNews();
+ }
+
+ if (!aparser.contains("nohtmltemplates")
+ && Cache.getProperty("NOHTMLTEMPLATES") == null)
+ {
+ BioJsHTMLOutput.updateBioJS();
+ }
+ }
+ }
+ // Run Commands from cli
+ cmds = new Commands(argparser, headlessArg);
+ boolean commandsSuccess = cmds.argsWereParsed();
+ if (commandsSuccess)
+ {
+ if (headlessArg)