Why didn't you use IOUtils.getResourceAsStream ?