X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=226a9255e58e6f31642177bb803be8bc3bb2b962;hb=82e0c09533b4f568b50fdc290be58589cea3ebb6;hp=ed1a93fac6c919ac17808fd3ea63538d54803a46;hpb=5dc0ca86227bf312d8daafba2f78b8429e6c1556;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index ed1a93f..226a925 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -15,7 +15,7 @@ import java.util.jar.*; public class Cache { public static String VERSION = "Release 2.0"; - public static String BUILD_DATE = "01-05-2005"; + public static String BUILD_DATE = ""; public static Properties applicationProperties; // Current properties include: @@ -27,7 +27,7 @@ public class Cache // FONT_STYLE // FONT_SIZE // logs.Axis.Level - one of the stringified Levels for log4j controlling the logging level for axis (used for web services) - + // jalview.browser - used in the jalview.utils.browserLauncher class if it doesn't know what else to do. public static void loadProperties() { // get last build time. @@ -43,14 +43,17 @@ public class Cache }catch(Exception ex){ex.printStackTrace();} if(date==0) { - // this is called for unpackaged class files. + // this is called for unpackaged class files, ie not in a Jar file + // InstallAnywhere version will find build date this way // not entirely accurate as it only tells you when Cache.class was last compiled - java.net.URL url = Cache.class.getResource("/jalview/bin/Cache.class"); - java.io.File f = new java.io.File(url.getFile()); - date = f.lastModified(); + + + java.io.File f = new java.io.File(System.getProperty("user.dir") + "/jalview/bin/Cache.class" ); + date = f.lastModified(); } - BUILD_DATE = new Date( date ).toString(); + if(date!=0) + BUILD_DATE = new Date( date ).toString(); applicationProperties = new Properties();