From: Ben Soares Date: Tue, 7 May 2019 23:05:44 +0000 (+0100) Subject: JAL-3247 Changed JVL file to be a props file, with appbase=... required for the new... X-Git-Tag: Release_2_11_0~12^2^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2379db28feafc643f7c1f675047eb88d4d520342;p=jalview.git JAL-3247 Changed JVL file to be a props file, with appbase=... required for the new appbase URL --- diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index 1497498..d41df7b 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java index e0f7c35..e3c7090 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java @@ -15,6 +15,7 @@ import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.File; +import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; @@ -1067,22 +1068,22 @@ public abstract class Getdown extends Thread // Do something special with this here File f = new File(filename); if (f.exists()) { - String line = null; + String appbase = null; try { - FileReader fr = new FileReader(f); - BufferedReader br = new BufferedReader(fr); - line = br.readLine(); - br.close(); + java.util.Properties jvlprops = new java.util.Properties(); + FileInputStream in = new FileInputStream(f); + jvlprops.load(in); + in.close(); + appbase = jvlprops.getProperty("appbase"); } catch(Exception e) { log.warning("Something went wrong reading Jalview Version Locator file '"+filename+"'", e); } - if (line != null) { - String urlString = line.trim(); + if (appbase != null) { try { - URL newAppbase = new URL(urlString); + URL newAppbase = new URL(appbase); _app.newAppbase(newAppbase); } catch(MalformedURLException e) { - log.warning("Java Version Locator url '"+urlString+"' found in file '"+filename+"' is malformed", e); + log.warning("Java Version Locator url '"+appbase+"' found in file '"+filename+"' is malformed", e); } } }