Update java code