Bundle and redistribute Sun’s JDK (with GlassFish)

I recently got a question in a JUG meeting about whether GlassFish could run on top of the JRE and not the JDK. The initial reason is that the person’s understanding was that only the JRE could be redistributed, not the JDK.

From a technical perspective, provided you don’t need to compile JSP’s, GlassFish should run fine on top of the JRE. In practice, this has not been extensively tested and you should note that creating domains does requires the JDK (although that’s not really runtime per say). Beyond the legal reasons (discussed below), you could be tempted to use the JRE just because of it’s size (it is much smaller than the full JDK) resulting in a smaller download for your GlassFish-powered application.

From a legal standpoint, the JDK is redistributable (Sun’s JDK that is). You can even subset the JDK and redistribute parts, according to rules that are included with the JDK README file (all subsets have to include the JRE).

Of course there’s also the option of using OpenJDK whose GPLv2 with ClassPath Exception licensing does not force you to GPL your own code (note that GlassFish itself is also licensed under those same rules in addition to the initial CDDL license).

As Eduardo Pelegri-Llopart wrote in a comment to the previous entry, “It is mostly a legal/packaging/resourcing exercise. We would be interested in use cases to help us prioritize this effort.”

(thanks to Bill Shannon and Jim Driscoll for scouting this).

Author: alexismp

Google Developer Relations in Paris.

2 thoughts on “Bundle and redistribute Sun’s JDK (with GlassFish)”

  1. Logistics apart, users who intend to create application bundles that are built on Glassfish … cannot. Only alternative is Tomcat. This is a must have feature in Glassfish V3

Comments are closed.

%d bloggers like this: