An auto-update mechanism written in java