summaryrefslogtreecommitdiff
path: root/BKUWebStart
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-07-21 16:39:54 +0200
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-07-21 16:39:54 +0200
commita38e14101f3e5bb4f2a758eff6cdcd87c9d99356 (patch)
treec7b3806ab5628c05604ff99581a6942e4fad59f2 /BKUWebStart
parent45baddc2fabeb09688b07099769100e056bcc1d3 (diff)
downloadmocca-a38e14101f3e5bb4f2a758eff6cdcd87c9d99356.tar.gz
mocca-a38e14101f3e5bb4f2a758eff6cdcd87c9d99356.tar.bz2
mocca-a38e14101f3e5bb4f2a758eff6cdcd87c9d99356.zip
Modified Autostart capability on Java Versions > 1.8
Diffstat (limited to 'BKUWebStart')
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java1
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java19
2 files changed, 11 insertions, 9 deletions
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java
index ee951a4b..026a947f 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java
@@ -135,7 +135,6 @@ public class Launcher implements BKUControllerInterface {
}
private Configurator config;
private Container server;
-// private BasicService basicService;
private StatusNotifier status;
private Autostart autostart;
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java
index 1b9996fc..c12ffde0 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java
@@ -152,14 +152,17 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener {
Menu settingsMenu = new Menu(messages.getString(LABEL_SETTINGS));
menu.add(settingsMenu);
- CheckboxMenuItem autostartItem = new CheckboxMenuItem(
- messages.getString(LABEL_AUTOSTART));
- autostartItem.addItemListener(this);
- autostartItem.setActionCommand(COMMANDS.AUTOSTART_COMMAND.name());
- autostartItem.setState(controller.isAutostartEnabled());
- autostartItem.setEnabled(controller.isAutostartPossible());
- settingsMenu.add(autostartItem);
-
+ // only add autostart for older java versions
+ String version = System.getProperty("java.version");
+ if (version.startsWith("1.")) {
+ CheckboxMenuItem autostartItem = new CheckboxMenuItem(
+ messages.getString(LABEL_AUTOSTART));
+ autostartItem.addItemListener(this);
+ autostartItem.setActionCommand(COMMANDS.AUTOSTART_COMMAND.name());
+ autostartItem.setState(controller.isAutostartEnabled());
+ autostartItem.setEnabled(controller.isAutostartPossible());
+ settingsMenu.add(autostartItem);
+ }
menu.addSeparator();
MenuItem shutdownItem = new MenuItem(