From 4b62dcee0f5d3c6ec91d8c7aab02985114c4b63c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 6 Sep 2018 16:38:54 +0200 Subject: async check update check --- .../src/main/java/at/gv/egiz/bku/webstart/Launcher.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'BKUWebStart') 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 30a6ce3d..a942909c 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 @@ -26,6 +26,7 @@ package at.gv.egiz.bku.webstart; import at.gv.egiz.bku.webstart.autostart.Autostart; import at.gv.egiz.bku.webstart.gui.StatusNotifier; +import at.gv.egiz.upater.MoccaUpdater; import at.gv.egiz.bku.webstart.gui.BKUControllerInterface; import at.gv.egiz.bku.webstart.gui.MOCCAIcon; import iaik.asn1.CodingException; @@ -164,6 +165,7 @@ public class Launcher implements BKUControllerInterface { } try { startServer(); + checkUpdate(); initFinished(); } catch (BindException ex) { log.error("Failed to launch server, " + ex.getMessage(), ex); @@ -184,6 +186,19 @@ public class Launcher implements BKUControllerInterface { throw ex; } } + + private void checkUpdate() { + new Thread(new Runnable() { + public void run(){ + try { + MoccaUpdater updater = new MoccaUpdater(version); + updater.run(); + }catch (Exception e) { + log.error(e.getMessage()); + } + } + }).start(); + } private void browse(URL url) throws IOException, URISyntaxException { // don't use basicService.showDocument(), which causes a java ssl warning dialog -- cgit v1.2.3