[jboss-user] [Installation, Configuration & Deployment] - Re: Reading Runtime Property Files from EAR

jantzen do-not-reply at jboss.com
Wed Jul 4 20:53:51 EDT 2007


This works:


  |       Properties defaultProperties = new Properties();      
  |       try {
  |          defaultProperties.load(getClass().getResourceAsStream("/default.runtime.properties"));         
  |       } catch (IOException e) {
  |          log.error("Unable to open default properties file: " + e.getMessage());
  |       } catch (NullPointerException npe) {
  |          log.error("Unable to locate default properties file");
  |       }
  |       Properties runtimeProperties = new Properties(defaultProperties);
  |       try {
  |          runtimeProperties.load(getClass().getResourceAsStream("/runtime.properties"));
  |       } catch (IOException ioe) {
  |          log.error("Unable to open runtime properties file, using defaults: " + ioe.getMessage());
  |       } catch (NullPointerException npe) {
  |          log.error("Unable to locate runtime properties file, using defaults");
  |       }
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060615#4060615

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060615



More information about the jboss-user mailing list