public static String getOption ( Properties props , String key ) throws IOException { String val = props . getProperty ( key ) ; if ( val == null ) { throw new IOException ( "Undefined property: " + key ) ; } return val ; }
Get a mandatory configuration option