Sun's plan to "open-source" Java
Disclaimer: This article reflects Chris Gray's personal view on Sun's recent announcements concerning Java licensing. I am not a lawyer, and this is not legal advice. This article should be read in the spirit of "here are some things you might like to discuss with a lawyer".
Wednesday 6 December 2006
After a long period of "pre-announcements", on 13 November 2006 Sun Microsystems finally unveiled their plans for making Java "free". You can read the official story here; below is a summary of what is to be released when, and under what licence.
What | When | Licence |
javac compiler | Now | GPL v2 + ClassPath exception |
| JavaSE HotSpot VM | Now | GPL v2 + ClassPath exception |
| All "unencumbered" source code modules of Java 6 and 7, plus build scripts | During 2007 | GPL v2 + ClassPath exception [Note 1] |
| "Encumbered" source code modules of Java 6 and 7 | ? | To be released as binary plug-ins |
| JavaME implementation for "mass-market" telephone handsets | Now | GPL v2 (no exception) |
| JavaME compatibility test (TCK) framework | Now | GPL v2 (no exception) |
| JavaME "advanced OS handset implementation" | Later | GPL v2 (no exception) |
| JavaME device test (JDT) framework | Later | GPL v2 (no exception) |
| JavaEE implementation (GlassFish) (already available under CDDL) | Soon | GPL v2 + ClassPath exception |
This is good news for Java, and good news for open-source Java projects. The ClassPath project in particular not only sees its licence "validated", it effectively gains access to those parts of JavaSE which Sun is opening up. ClassPath will remain necessary for those who need a complete free implementation of JavaSE, as it includes implementations for the parts which Sun are not (yet) making free. Sun's move can also be seen as "legitimising" other open-source implementations, and developers of open-source software who choose to write in Java will no longer have to fear that they are using a proprietary language (the so-called Java Trap).
But what does it mean for embedded Java? In particular, does it mean
that sometime soon you'll be able to download Sun's Reference
Implementation of JavaME CDC (the so-called CVM) and use it in your
product, free of charge? And if you do that, what are the implications
for the Java applications that are installed on the device? Sun's answer
to these questions can be found here:
http://forums.java.net/jive/thread.jspa?messageID=175820
Quote:
What that means is:
- the GPL applies when you distribute the code, not when you run the code.
- Developers of JME applications generally do _NOT_ distribute the VM, the VM
is already installed in the device.
- The end user of the GPL ME VM can run application with any license on top of
that VM, he is not distributing the VM.
- A developer that distributes only the application does not need to care what
is the licensing of the VM the code will run on, he is not distributing the
VM.
- If a developer creates a new version of the ME VM and distribute it, the GPL
copyleft applies to the modified ME VM.
- If a developer for any reason distributes the GPL ME VM with pre-installed
applications, the GPL copyleft properties will also be triggered, and will
affect the applications. That means that phone manufacturers and also cell
phone operators will need to discuss licensing terms with Sun (what they
would probably do anyway) or they will need to distribute their bundled
applications under the GPL.
So if you develop applets, midlets, whatever that will be downloaded onto a GPL version of Sun's VM, no problem. No problem either if you want to create an all-open-source device. But if you want to ship your device with pre-installed software which you do not want to place under a GPL-compatible licence (or you cannot do so, because the software is licensed-in), you need to do one of two things:
- Get a commercial licence from Sun, just as before, or
- Use a different, "non-infectious" VM.
/K/'s Mika is non-infectious, because it comes with a BSD-style licence. Kaffe is under GPL just like Sun's open Java, but key developer Dalibor Topic apparently believes that this does not affect the applications which run on Kaffe, even if they are distributed together with the VM; to him this is just "mere aggregation". So with Kaffe you are probably OK (although you may have difficulty convincing a company lawyer of this). Other non-GPL VMs include ikvm, which runs on top of Mono; for GPL'd VMs it is best to contact the authors to see what arrangements can be made.
BTW Sun's clarification leaves one "loophole" unaddressed: suppose that a device is shipped with almost no Java applications, and fetches everything from a server the first time it is booted? The answer here may be that if the software which gets downloaded is only useful on the device in question, then it's just as if it were shipped with the device. Then again, maybe not - who knows? Lot of fun ahead ...
Note 1: Elsewhere it is stated that the ClassPath exception may not apply to all parts of JavaSE.
Copyright © 2006 Chris Gray, /k/ Embedded Java Solutions. The author may be contacted at chris.gray@kiffer.be.