It's not "clean", only JRE that have passed the TCK (Java Compatibility Kit) get the patent waiver, if you modify the JRE and don't get it re-certified then you lose the patent protection. And to get it certified you have to agree to a restrictive licence from Oracle. Sun promised Apache to make the TCK available under an open licence but this never happened.
IBM was previously putting pressure on Sun/Oracle to make the TCK available under the open licence to Apache that they had promised, since IBM have switched to OpenJDK, it removes that pressure and makes Java much more closed.
> only JRE that have passed the TCK (Java Compatibility Kit) get the patent waiver,
No. That's not true. As long as your code is derived from OpenJDK (and unavoidably licensed under GPL), you are protected from patent lawsuits from Oracle (for technology contributed to OpenJDK). What it doesn't protect you from is trademark issues if you claim whatever thing you have is Java. You can say "pretty much compatible with that famous VM invented by Sun(TM)" and you are clear.
> And to get it certified you have to agree to a restrictive licence from Oracle
Again, the GPL states you can use OpenJDK for whatever you want. If you decide to run a nuclear reactor with it, you are free to do so (as only the Oracle JDK is licensed under such restrictive terms)
> Sun promised Apache to make the TCK available under an open licence but this never happened.
I understand this is the core of the problem. What is not clear is how this adversely affects users.
> since IBM have switched to OpenJDK, it removes that pressure and makes Java much more closed.
We still have OpenJDK licensed under GPL. How's that closed?
It's ambiguous. Oracle's not the only company with patents in Java technology, the TCK patent protection clause is stronger than that in the GPL, in that it give you protection against non-Oracle patents that are part of Java. It's arguable that Oracle implicitly licences these as part of the GPL patent clause, but it's not watertight.
Third-party implementations such as Harmony (and presumably GNU Classpath) obviously don't have patent protection because they neither derive from OpenJDK nor have a TCK licence. Java isn't open until anyone can freely implement it.
> It's arguable that Oracle implicitly licences these as part of the GPL patent clause, but it's not watertight.
It's Oracle's obligation to either give a royalty-free permission to use and grant usage of its patented technology (all of it, not only stuff expressed in code it contributed) or refrain from distributing OpenJDK under GPL altogether.
Oracle isn't the only company with patents in the JRE though, when a third party contributes patented technology to the JRE they have to agree to the patent waiver for all TCK passing implementations.
Dependent on the language of these waivers, Oracle may or may not be considered to be "controlling" the patents. If they're not controlling the patents then it means they can't give the GPL waiver on behalf of the other contributors, and thus any non-TCK compliant OpenJDK fork may be in violation.
Speaking more generally GPL v2 was never really designed to handle patents, the patent clauses are pretty much secondary to the rest of the GPL, and probably are much more vulnerable to attack via loopholes than the rest of the GPL due to their vague and implicit nature.
The GPL states that if you fail to grant downstream users rights to use and redistribute the code (which includes any patented code contributed by the patent holder to the product from any party that did it, not only Oracle) you cannot distribute your code under the GPL.
If Oracle included patented technology it did not control, then it must stop distribution of infringing code under the GPL. That's one of the reasons it took so long for Sun to license its code under GPL - it was cleaning up code, removing patent-infringing code.
The terms of the TCK will not protect you from lawsuits for infringing on patents Oracle had not the right to grant you usage. In fact, no agreement with Oracle would.
>"What it doesn't protect you from is trademark issues if you claim whatever thing you have is Java."
There's more to it than that. If I call it Dalvik, like Google did, why would I get a lawsuit?
Edit: I have to say I don't think I even understand what open source means anymore. If I release an open source product, but then say you can only make modifications and sell it if you pass my tests (which I don't make freely available), it's not really open right?
> If I release an open source product, but then say you can only make modifications and sell it if you pass my tests (which I don't make freely available), it's not really open right?
I believe your restriction on making derived works conflicts with just about every free and open-source license out there. What Sun did and Oracle does prohibit you from doing is calling something that doesn't pass the non-freely-available TCK by the name Java or implying it's Java-compatible.
As for Dalvik, it's not derived from a project Oracle contributed the said patents. In this way, Dalvik is not protected agains Oracle's lawyers.
> As long as your code is derived from OpenJDK (and unavoidably licensed under GPL), you are protected from patent lawsuits from Oracle (for technology contributed to OpenJDK).
I don't think that is correct. OpenJDK is under GPLv2, so there is no explicit patent license. However, it seems pretty well accepted (among lawyers) that there is an implicit patent grant. That implicit license would certainly cover the unmodified OpenJDK, but how much you can modify it and still be covered is uncertain.
>We still have OpenJDK licensed under GPL. How's that closed?
See the Oracle vs. Google suit for how it is closed. There is one blessed open implementation, other implementations get the shaft aka Apache harmony, Google's Dalvik.
IBM was previously putting pressure on Sun/Oracle to make the TCK available under the open licence to Apache that they had promised, since IBM have switched to OpenJDK, it removes that pressure and makes Java much more closed.