public static void loadProperties()\r
{\r
// get last build time.\r
+ long date = 0;\r
try{\r
- long date = 0;\r
-\r
String localFile = Cache.class.getProtectionDomain().getCodeSource().getLocation().toString();\r
localFile = localFile.concat("!/");\r
String tmpString = "jar:";\r
String localJarFileString = tmpString.concat(localFile);\r
java.net.URL localJarFileURL = new java.net.URL(localJarFileString);\r
java.net.JarURLConnection localJarFile = (java.net.JarURLConnection)localJarFileURL.openConnection();\r
-\r
date = localJarFile.getLastModified();\r
+ }catch(Exception ex){ex.printStackTrace();}\r
+ if(date==0)\r
+ {\r
+ // this is called for unpackaged class files.\r
+ // not entirely accurate as it only tells you when Cache.class was last compiled\r
+ java.net.URL url = Cache.class.getResource("/jalview/bin/Cache.class");\r
+ java.io.File f = new java.io.File(url.getFile());\r
+ date = f.lastModified();\r
+ }\r
\r
- if(date==0)\r
- {\r
- // this is called for unpackaged class files.\r
- // not entirely accurate as it only tells you when Cache.class was last compiled\r
- java.net.URL url = Cache.class.getResource("/jalview/bin/Cache.class");\r
- java.io.File f = new java.io.File(url.getFile());\r
- date = f.lastModified();\r
- }\r
-\r
- BUILD_DATE = new Date( date ).toString();\r
-\r
+ BUILD_DATE = new Date( date ).toString();\r
\r
- }catch(Exception ex){ex.printStackTrace();}\r
\r
\r
applicationProperties = new Properties();\r