update author list in license for (JAL-826)
[jalview.git] / src / jalview / bin / Cache.java
index d2f400d..63a3412 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
  * 
  * This file is part of Jalview.
  * 
@@ -141,7 +141,8 @@ import org.biojava.dasobert.dasregistry.Das1Source;
  *  * <li>DISCOVERY_START - Boolean - controls if discovery services are queried on
  * startup (JWS1 services only)</li>
  * <li>DISCOVERY_URLS - comma separated list of Discovery Service endpoints. (JWS1 services only)</li>
- * <li>SHOW_JWS1_SERVICES (true) enable or disable the original Jalview 2 services in the desktop GUI
+ * <li>SHOW_JWS1_SERVICES (true) enable or disable the original Jalview 2 services in the desktop GUI</li>
+ * <li>ENABLE_RSBS_EDITOR (false for 2.7 release) enable or disable RSBS editing panel in web service preferences</li> 
  * </ul>
  * @author $author$
  * @version $Revision$
@@ -277,6 +278,26 @@ public class Cache
       System.setProperty("http.proxyPort", getDefault("PROXY_PORT", null));
     }
 
+    // LOAD THE AUTHORS FROM THE authors.props file
+    try
+    {
+      String authorDetails = "jar:".concat(Cache.class.getProtectionDomain()
+              .getCodeSource().getLocation().toString()
+              .concat("!/authors.props"));
+
+      java.net.URL localJarFileURL = new java.net.URL(authorDetails);
+
+      InputStream in = localJarFileURL.openStream();
+      applicationProperties.load(in);
+      in.close();
+    } catch (Exception ex)
+    {
+      System.out.println("Error reading author details: " + ex);
+      applicationProperties.remove("AUTHORS");
+      applicationProperties.remove("AUTHORFNAMES");
+      applicationProperties.remove("YEAR");
+    }
+
     // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar
     // MUST FOLLOW READING OF LOCAL PROPERTIES FILE AS THE
     // VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW