Clean up, update Java samples I wrote some time ago...

Namely, per my personal copy of these, update maven dependencies, required JDK version, try-with-resources pattern, and assembly xml namespace. Verified code with static analysis tools, etc.