update java doc and remove useless codes