The attached patch fixes the issue by removing the full path to
rebuild-gcj-db from the maintainer script snippets. This is valid
because rebuild-gcj-db is always installed if java-gcj-compat-dev gets
installed. This is the dependency chain:
java-gcj-compat depends on
libgcj9-0-awt depends on
libgcj9-0 depends on
libgcj-common
I added an explicit dependency to libgcj-common to make this more
visible though.