changeset 1510:bc46334f8730

* netx/net/sourceforge/jnlp/runtime/Boot.java: returned handling of version, licnes, help, property and about which disapeared without any trace inchangelog
author Jiri Vanek <jvanek@redhat.com>
date Tue, 02 Oct 2018 10:45:37 +0200
parents 2f0a9aa90a60
children 88f126034b7b
files netx/net/sourceforge/jnlp/runtime/Boot.java
diffstat 1 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Tue Oct 02 10:36:25 2018 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Tue Oct 02 10:45:37 2018 +0200
@@ -122,6 +122,48 @@
             }
         }
 
+        if (optionParser.hasOption(OptionsDefinitions.OPTIONS.VERSION)) {
+            OutputController.getLogger().printOutLn(nameAndVersion);
+            JNLPRuntime.exit(0);
+        }
+
+        if (optionParser.hasOption(OptionsDefinitions.OPTIONS.LICENSE)) {
+            OutputController.getLogger().printOutLn(miniLicense);
+            JNLPRuntime.exit(0);
+        }
+
+        if (optionParser.hasOption(OptionsDefinitions.OPTIONS.HELP1)) {
+            handleMessage();
+            JNLPRuntime.exit(0);
+        }
+        List<String> properties = optionParser.getParams(OptionsDefinitions.OPTIONS.PROPERTY);
+        if (properties != null) {
+            for (String prop : properties) {
+                try {
+                    PropertyDesc propDesc = PropertyDesc.fromString(prop);
+                    JNLPRuntime.getConfiguration().setProperty(propDesc.getKey(), propDesc.getValue());
+                } catch (LaunchException ex) {
+                    OutputController.getLogger().log(ex);
+                }
+            }
+        }
+
+        if (optionParser.hasOption(OptionsDefinitions.OPTIONS.ABOUT)) {
+            handleAbout();
+            if (JNLPRuntime.isHeadless()) {
+                JNLPRuntime.exit(0);
+            } else {
+                try {
+                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+                } catch (Exception e) {
+                    OutputController.getLogger().log("Unable to set system look and feel");
+                }
+                OutputController.getLogger().printOutLn(R("BLaunchAbout"));
+                AboutDialog.display(TextsProvider.JAVAWS);
+                return;
+            }
+        }
+
         if (optionParser.hasOption(OptionsDefinitions.OPTIONS.UPDATE)) {
             int value = Integer.parseInt(optionParser.getParam(OptionsDefinitions.OPTIONS.UPDATE));
             JNLPRuntime.setDefaultUpdatePolicy(new UpdatePolicy(value * 1000l));