2 package net.sourceforge.guacamole.net;
4 import java.io.IOException;
5 import java.util.Properties;
6 import javax.servlet.ServletException;
7 import net.sourceforge.guacamole.GuacamoleException;
8 import net.sourceforge.guacamole.net.authentication.basic.BasicLogin;
10 public class GuacamoleProperties {
12 private static final Properties properties = new Properties();
13 private static GuacamoleException exception;
18 properties.load(BasicLogin.class.getResourceAsStream("/guacamole.properties"));
20 catch (IOException e) {
21 exception = new GuacamoleException("Error reading guacamole.properties", e);
26 public static String getProperty(String name) throws GuacamoleException {
27 if (exception != null) throw exception;
28 return properties.getProperty(name);