> Java also gets you the world's second-most-complete git implementation,
> so you don't need to fork and exec to run one of the git tools from your
> server software.
This is the primary reason why Gerrit is written in Java. We didn't want
to have to fork+exec the C git implementation in response to web requests,
and there really isn't a suitable C library available for access to a Git
repository. I've chosen to invest in JGit, the folks at GitHub have been
investing in Grit (Ruby Git library) and Dulwich (Python Git library) for
the same reasons.
The second reason is, some companies prefer web software written in a
higher level than C, because there is less risk of a buffer overflow
ruining the day. There is still a chance, but the odds are much lower when
a virtual machine (e.g. JVM) is enforcing array bounds checks.
The third reason was mentioned in the article, much of Android's user space
code is developed in Java, so the original audience for Gerrit would be
more comfortable patching a Java tool than a C or Python tool. In practice
I'm not sure how much this has helped Gerrit. We've received quite a few
contributions from non-Google companies who use Gerrit, and I have no idea
whether or not the Java language has helped or hurt those contributions.
I'm really just tired of building websites. GWT makes it a bit easier to
build a web based UI. Pyjamas is an alternative if you are in Python, but
see my point above trying to gain contributors who are primarily Java
developers that are already using the tool. (There's nothing in open
source like using a frobinator that you can freely patch when its broken,
annoys you, or doesn't do what you want it to.)
Finally, Java is open source. There are openjdk builds now available in
Debian that are licensed under GPLv3. Java pretty much runs everywhere,
and so does Gerrit. I know people are running Gerrit Code Review on both
Linux and Windows servers. I've also heard of success running JGit on
OpenVMS, something no other Git implementation has done before.