Handwriting Recognition using Java