Comment 9 for bug 257857

Revision history for this message
Nicolas Lehuen (nicolas-lehuen) wrote :

The JRE has the concept of graphical toolkits (AWT Toolkits) that vary depending on the platform it runs on. Those toolkits are Java classes implementing the UI layer through native calls, so there are toolkits for Mac, Windows, and I assume there are different X11 toolkits for Linux depending on the fact that you use Motif / GTK / QT etc.

The JRE can operate in headless mode. Before this (in a far far past), we had to run JDK along with xvfb in order to perform some graphical operation like image manipulation, even on a server. With the headless mode, no need for a virtual X11 server, no need for X11 at all. So the toolkit and its dependencies (a gazillion of megabytes of unicode fonts, for instance) are no more needed. I guess that was the whole purpose of making a special openjdk-6-jre-headless package, it comes without the toolkit.

Running the openjdk-6-jdk JDK (i.e. development tools like the javac compiler) on openjdk-6-jre-headless makes sense, for that except for a few tools like jconsole, everything runs in command line and doesn't require a GUI. Moreover, most of the time there is no mention of toolkit classes in standard Java code (for the good reason that the toolkit classes are implementation dependent and not part of the public API), so compiling some code should not break in a headless environment.

So there are three possibilities :

1) just let things as they are now, forcing everyone who want to have a web application with dynamic compilation of JSP to download the whole X11 toolkit and dependencies even though it won't work anyway. Note that there are some application server that provide their own compiler (the Eclipse one IIRC) so sidestep this whole issue.
2) make openjdk-6-jdk depend on openjdk-6-jre OR openjdk-6-jre-headless
3) make a new openjdk-6-jdk-headless depending on openjdk-6-jre-headless and take this opportunity to remove graphical tools like jconsole from the headless JDK. This is the one that requires most work, and I'm not sure it will be very effective in savings contrary to the previous option.