summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2018-09-06 14:38:54 (GMT)
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2018-09-06 14:38:54 (GMT)
commit4b62dcee0f5d3c6ec91d8c7aab02985114c4b63c (patch)
tree271101694711ce65883c81f9621ded8ec92ae3fc
parent08f7b54d07ea4e54b76b2ecc836e6db96dd84287 (diff)
downloadmocca-4b62dcee0f5d3c6ec91d8c7aab02985114c4b63c.zip
mocca-4b62dcee0f5d3c6ec91d8c7aab02985114c4b63c.tar.gz
mocca-4b62dcee0f5d3c6ec91d8c7aab02985114c4b63c.tar.bz2
async check update check
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Launcher.java15
1 files changed, 15 insertions, 0 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 30a6ce3..a942909 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