加载properties文件至java.util.Properties对象

java.net.URL url = Thread.currentThread().getContextClassLoader()
                     .getResource("struts2ejb3/jndi.properties");
Properties props = new Properties();
props.load(url.openStream());

你可能感兴趣的:(java,thread,.net)