import java.util.*;\r
import java.io.*;\r
\r
+import java.util.jar.*;\r
public class Cache\r
{\r
+ public static String VERSION = "ß test";\r
+ public static String BUILD_DATE = "1-1-2005";\r
+\r
public static Properties applicationProperties;\r
// Current properties include:\r
//\r
\r
public static void loadProperties()\r
{\r
+ // get last build time.\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
+\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
+\r
+ }catch(Exception ex){ex.printStackTrace();}\r
+\r
+\r
applicationProperties = new Properties();\r
\r
try\r