Java Client Example.