[java] fix resource copying on windows