In order to use gcj to compile the java binding, you must also have development files of libgcj. On Debian systems that translates to libgcj4-dev for gcj 3.3 and libgcj5-dev for gcj 3.4.