I run with the Junit in test-class,it cann't get the files in class package. So that means this class can not work with unit test. Thanks a lot:) PS:what about use this? Thread.currentThread().getContextClassLoader().getResources