added Java sample.
Merge pull request #1 from khoyee/master

added Java sample.