Java bindings: adapting test programs and makefile.