summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'BKUApplet/src/main/java/at/gv/egiz')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index 8ae1471b..46ee4102 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -31,6 +31,7 @@ import java.awt.Container;
import java.awt.Point;
import java.io.IOException;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.security.AccessController;
import java.security.AllPermission;
@@ -58,6 +59,7 @@ import at.gv.egiz.bku.gui.BKUGUIImpl;
import at.gv.egiz.bku.gui.HelpListener;
import at.gv.egiz.bku.gui.viewer.FontProvider;
import at.gv.egiz.bku.online.applet.viewer.URLFontLoader;
+import at.gv.egiz.bku.utils.JarLocation;
import at.gv.egiz.smcc.SignatureCardFactory;
import at.gv.egiz.stal.service.STALPortType;
import at.gv.egiz.stal.service.STALService;
@@ -107,8 +109,8 @@ public class BKUApplet extends JApplet {
String tmp = UNKNOWN_VERSION;
Logger log = LoggerFactory.getLogger(BKUApplet.class);
try {
- String BKUAppletJar = BKUApplet.class.getProtectionDomain().getCodeSource().getLocation().toString();
- URL manifestURL = new URL("jar:" + BKUAppletJar + "!/META-INF/MANIFEST.MF");
+ String bKUAppletJar = JarLocation.get(BKUApplet.class);
+ URL manifestURL = new URL("jar:" + bKUAppletJar + "!/META-INF/MANIFEST.MF");
log.trace("Read version information from {}.", manifestURL);
Manifest manifest = new Manifest(manifestURL.openStream());
Attributes atts = manifest.getMainAttributes();
@@ -117,6 +119,8 @@ public class BKUApplet extends JApplet {
}
} catch (IOException ex) {
log.error("Failed to read version.", ex);
+ } catch (URISyntaxException ex) {
+ log.error("Failed to read version.", ex);
} finally {
VERSION = tmp;
log.debug("BKU Applet {}.", VERSION);