added java sample