Fixes #4278: Improvements in Java bindings

---svn-pre-commit-ignore-below---

r30737 [[BR]]
Improve exception check.

r30738 [[BR]]
mpi.Comm: java object members as parameters

r30741 [[BR]]
mpi.Comm: java object members as parameters