X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=3e5d583e4c779a4b8645f9f52eed30f481eb5ff8;hb=5d4f312f392e448a128138404fc4bc72762f072a;hp=b018f9c47cddf376fb6848a16581a98ce1785401;hpb=703901ee1111a5c61922c71618156f165258412d;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index b018f9c..3e5d583 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -289,6 +289,8 @@ public class Cache private static boolean propsAreReadOnly = Platform.isJS(); + private static String JS_PROPERTY_PREFIX = "jalview_"; + public static void initLogger() { if (log != null) @@ -351,7 +353,10 @@ public class Cache propsAreReadOnly = true; } - if (propertiesFile != null) { + if (propertiesFile == null) + { // BH 2019 + Platform.readInfoProperties(JS_PROPERTY_PREFIX , applicationProperties); + } else { try { InputStream fis; @@ -593,7 +598,14 @@ public class Cache */ public static String getProperty(String key) { - return applicationProperties.getProperty(key); + + String prop = applicationProperties.getProperty(key); + if (prop == null && Platform.isJS()) + { + prop = applicationProperties.getProperty(Platform.getUniqueAppletID() + "_" + JS_PROPERTY_PREFIX + key); + } + + return prop; } /**