I've rebuilt PostgreSQL on quark for Java support.
I used the --with-java compile-time option to enable it.