add some java sample code