Reorganise the java samples.
Merge pull request #392 from fmoloney/ReorganiseSamples

Reorganise the java samples.