Java and the GPL License

Several commentators have remarked that Sun’s decision to make Java available under the GNU Public License is unusual. Why did they not use the standard Sun CDDL license? Well the CDDL was crafted with a specific some specific goals,

  • Allow Sun to Open Source Solaris
  • Prevent Solaris key features from leaking into Linux by applying an incompatible license
  • Allow relicensing with Apache-like flexibility especially to (Sun would love Dell to ship solaris on their servers)

So why the GPL for Java. Well despite all kiss and make up shenanigans between Sun and Microsoft, Sun would still dearly love to stick it to Microsoft in a big way and it has always seen Java as the key tool to pick the Microsoft lock on the market.

So the thinking goes, if we CDDL it (CDDL is a variation on the Mozilla license, which is a variation on the Apache License) then Microsoft gets to grab the code and do any number of things that would ruin Jonathan Schwartz’s day e.g.

  • Fork Java and create an incompatible version that only runs on Windows (they tried this before)
  • Swipe any cool virtual machine technology that Sun has developed and plug it straight into the Microsoft C# engine
  • Gratuitiously extend Java so that developers are sucked into building applications that only run on Windows (a pretty standard Microsoft tactic)

The GPL prevents all this because the highly integrated nature of most of Microsoft’s technology means that the they key GPL constraint of linking to a GPL component entails extending the license to all linked components means they would have to open source most of the .NET framework. That is not going to happen anytime soon.

Its a double whammy for Sun because practically all the compilers on Linux are GPL licensed, so they dovetail nicely into that collection. Who’s not to say that Java could eventually migrate to the GNU backend so that Java just becomes another personality on top of that engine. They would reap huge portability benefits for very little work.

Tricky one for Microsoft, they can ignore Java and watch as the rest of the platform work (most importantly mobile) embraces this new language, but that won’t work becuase the mobile platform is a key plank of Microsoft’s strategy going forward. Or they could adopt it properly as a Visual Studio language, but it would always be a second class citizen becuase of the linking restriction.

Damned if you do, damned if you don’t. Almost makes you feel sorry for the poor sods, especially after stuffing their whole  Visual Basic community with

3 thoughts on “Java and the GPL License

  1. Joe,
    Not to defend MS or anything but did you miss the fact that Sun explicitly added the “classpath exception” to their GPL license to address the usual GPL linking restriction? See

    MS are perfectly entitled to fork the OpenJDK codebase. They just cannot subsequently call the fork “Java” as that trademark is owned and licensed by Sun. MS would of course have to release the source for any fork as required by GPL but even that isn’t as bad as it sounds.

    Enter the Classpath exception. MS are allowed to “extend” the code in the OpenJDK in whatever direction they want as they are just linking new types via the classpath.

    Extension via modification to the OpenJDK types would require source publication, but again, they would only have to publish the source for the modified types, not that of their entire derived frameworks. The classpath exception is there for exactly that reason.

    The Sun VM implementation source, on the other hand, is fully GPL though they’d have a hard time proving any of that C code ends up borrowed elsewhere. Sun would be far more likely to go chasing MS for violation of VM patents (which incidentally Sun apparently have a war chest of thanks to their head start working on dynamic code recompilation engines like HotSpot)

    You’re right though, this was a master stroke by Sun and they did it at the right time. It undermines IBM


  2. Hey, I didn’t know about that. Thats pretty cool. Unfortunately it doesn’t fix the problem for Microsoft who would need to link Java into .NET in all kinds of exotic ways that exceed the assigned rights of the classpath exception. If they could escape the constraints of the GPL this way then Sun would have played right into Microsoft’s hands, I don’t think that is the case.

    What does happen to the patents for things like hotspot? Thats a good (unanswered question).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.