What is Debian's stance regarding GCJ and OpenJDK?
Both OpenJDK and GCJ are available for install on Debian, and now I wonder what’s happening. Don’t these provide same functionality?
They are fine with both for the most part: OpenJDK is installed by default on supported platforms, otherwise GCJ will be used instead.
Reference: http://wiki.debian.org/Java
Debian’s stance is that, beyond certain critical system components which are considered required¹, there is no preferred software. If two programs provide similar functionality, and they’re both suitable for Debian², and there’s a Debian developer willing to maintain each package, then both programs will end up in Debian. The idea is that it’s up to the user to choose which program to use.
On a given system, at most one Java implementation can be /usr/bin/java
. This is decided through the alternatives mechanism: each Java implementation has a priority (decided by common agreement amongst the maintainers of the Debian packages involved), and whichever implementation that is installed on a particular system has the highest priority gets to be /usr/bin/java
. The system administrator can override this by manually changing the /etc/alternatives/java
symbolic link. And if there are several JVMs installed, users can choose on a case-by-case basis to run /usr/lib/jvm/java-6-openjdk/jre/bin/java
, /usr/lib/jvm/java-6-sun/jre/bin/java
, etc.
¹
Or at least strongly advised.
²
The best-known requirement is that the program must be free software, with some exceptions (non-free
); another is that it must not be too buggy.