update java demo