This content has been marked as final.
Show 1 reply
-
1. Re: Reading Runtime Property Files from EAR
jantzen Jul 4, 2007 8:53 PM (in response to jantzen)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"); }