refacto of java resources