1 /********************
\r
2 * 2004 Jalview Reengineered
\r
10 package jalview.bin;
\r
16 public static Properties applicationProperties;
\r
17 // Current properties include:
\r
19 // LAST_DIRECTORY , use this to cache record of where the user looked to find a file
\r
21 // USER_DEFINED_COLOUR - file describing last user set colours
\r
23 public static void loadProperties()
\r
25 applicationProperties = new Properties();
\r
29 FileInputStream in = new FileInputStream(System.getProperty("user.home") +
\r
30 "/.jalview_properties");
\r
31 applicationProperties = new Properties();
\r
32 applicationProperties.load(in);
\r
35 catch (Exception ex)
\r
39 public static String getProperty(String key)
\r
41 return applicationProperties.getProperty(key);
\r
44 public static String setProperty(String key, String obj)
\r
48 FileOutputStream out = new FileOutputStream(System.getProperty(
\r
49 "user.home") + "/.jalview_properties");
\r
51 applicationProperties.setProperty(key, obj);
\r
53 applicationProperties.store(out, "---JalviewX Properties File---");
\r
56 catch (Exception ex)
\r