update java example