JAL-3978 Using getdowninstanceappdir and getdowninstanceappbase to avoid conflict...
[jalview.git] / src / jalview / bin / Cache.java
index 22a6b69..0ec0e78 100755 (executable)
@@ -518,25 +518,29 @@ public class Cache
                     + orgtimeout + " seconds.");
           }
           String remoteVersion = null;
-          try
+          if (remoteBuildPropertiesUrl.startsWith("http"))
           {
-            System.setProperty("sun.net.client.defaultConnectTimeout",
-                    "5000");
-            java.net.URL url = new java.net.URL(remoteBuildPropertiesUrl);
+            try
+            {
+              System.setProperty("sun.net.client.defaultConnectTimeout",
+                      "5000");
 
-            BufferedReader in = new BufferedReader(
-                    new InputStreamReader(url.openStream()));
+              URL url = new URL(remoteBuildPropertiesUrl);
 
-            Properties remoteBuildProperties = new Properties();
-            remoteBuildProperties.load(in);
-            remoteVersion = remoteBuildProperties.getProperty("VERSION");
-          } catch (Exception ex)
-          {
-            System.out
-                    .println("Non-fatal exception when checking version at "
-                            + remoteBuildPropertiesUrl + ":");
-            System.out.println(ex);
-            remoteVersion = getProperty("VERSION");
+              BufferedReader in = new BufferedReader(
+                      new InputStreamReader(url.openStream()));
+
+              Properties remoteBuildProperties = new Properties();
+              remoteBuildProperties.load(in);
+              remoteVersion = remoteBuildProperties.getProperty("VERSION");
+            } catch (Exception ex)
+            {
+              System.out.println(
+                      "Non-fatal exception when checking version at "
+                              + remoteBuildPropertiesUrl + ":");
+              System.out.println(ex);
+              remoteVersion = getProperty("VERSION");
+            }
           }
           System.setProperty("sun.net.client.defaultConnectTimeout",
                   orgtimeout);
@@ -1207,9 +1211,9 @@ public class Cache
       appendIfNotNull(sb, "Channel: ",
               ChannelProperties.getProperty("channel"), "\n", null);
       appendIfNotNull(sb, "Getdown appdir: ",
-              System.getProperty("getdownappdir"), "\n", null);
+              System.getProperty("getdowninstanceappdir"), "\n", null);
       appendIfNotNull(sb, "Getdown appbase: ",
-              System.getProperty("getdownappbase"), "\n", null);
+              System.getProperty("getdowninstanceappbase"), "\n", null);
       appendIfNotNull(sb, "Java home: ", System.getProperty("java.home"),
               "\n", "unknown");
     }