Update Java structure packing implementation.

Add a first JUnit test case, and associated autoconf files.