fix Resource.java