open-source-software gpl
Is it legal to rewrite a Java (OpenJDK) library into another programming language under GPL?
<p>Is it legal for me to re-implement a <a href="https://en.wikipedia.org/wiki/Java_(software_platform)" rel="nofollow">Java</a> library in another programming language under the <a href="https://en.wikipedia.org/wiki/GNU_General_Public_License" rel="nofollow">GNU General Public License (GPL)</a> <a href="https://en.wikipedia.org/wiki/GNU_General_Public_License#Version_2" rel="nofollow">version 2</a> (<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.txt" rel="nofollow">text</a>)? </p>

<ul>
<li>I would mimic their exact API (package, class, and method names) except replacing the trademarked word “java”. </li>
<li>The source code taken from the <a href="https://en.wikipedia.org/wiki/OpenJDK" rel="nofollow">OpenJDK</a> project for Java SE 8 would be used as a guide to write the equivalent as closely as possible line-by-line in the other language. </li>
<li>All of this would be made publicly available easily on a source-code sharing site such as BitBucket.com or GitHub.com. These files would include the necessary prominent notices and licenses statements as required by the GPL.</li>
</ul>

<p>As an example, the source code from <a href="http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/HashMap.java" rel="nofollow"><code>java.util.HashMap</code></a>.</p>

<p>The Gnu.org FAQ, <a href="http://www.gnu.org/licenses/gpl-faq.en.html#TranslateCode" rel="nofollow">What does the GPL say about translating some code to a different programming language?</a> says that translation to another programming language is treated like other modifications, acceptable if all terms of GPL are met.</p>

<p>I would have thought the GPL’s very purpose is to allow such freedom. My confusion stems from the <a href="http://www.scribd.com/doc/223096561/Oracle-versus-Google-appeal-ruling" rel="nofollow"><em>Oracle versus Google appeal ruling</em></a>  of 2014-05-09 by the United States Court of Appeals for the Federal Court. That ruling upholds copyrightability of an API, which I can understand. What I do not understand is why that copyrightability issue is relevant given the source code is available under the GPL. </p>

<p>I suppose their are two core parts to my question:</p>

<ul>
<li>Is the GPL rendered impotent if the original publishers decides to pursue a claim of copyright violation against anyone forking or imitating their GPL-licensed work? How can <a href="http://www.macnn.com/articles/16/03/30/ongoing.infringement.suit.between.oracle.and.google.heads.to.pretrial.in.april.133281/" rel="nofollow">Oracle claim damages</a> from infringing copyright on code published under the GPL?</li>
<li>Is there any other restriction beyond the terms of the GPL that would bar me from producing an open-source rewrite/translation of a Java (OpenJDK) library in another programming language?</li>
</ul>

<p>The GPL that covers the OpenJDK certainly allows you to write and distribute your own Java implementation. On that point, your reading is absolutely correct. However, <em>if that implementation is a derivative work of the OpenJDK</em>, then the GPL requires you to make your derivative implementation available under the GPL as well, per the GPL's copyleft rules. If you follow the rules of the GPL, you can do exactly what you propose.</p>
<p>Note that the Supreme Court ruling in <em>Oracle v. Google</em> found that using only API structure and names, without copying any underlying implementation, constitutes fair use, and therefore doesn't require copyright permission. If you hold your implementation to that standard and use/look at only interfaces while authoring your new implementation, then your new work is broadly allowed under copyright law, so you do not need to rely on the GPL's permissions (and therefore neither do you need to follow its requirements).</p>
<p>Google didn't want to have to abide by the terms of the GPL, probably because due to concerns that the any GPL terms that applied to their Java implementation might also apply to other components of their system, which they wished to keep closed-source. In other words, if Google had claimed their acquired their right to use the APIs under the GPL, then they would have been required to put potentially the entire operating system under the GPL, which they had not done nor wished to do.</p>
<p>For this case, the GPL has been largely ignored because Google has not followed the requirements of GPL in licensing their Java implementation (and operating system that uses it), so there's no point in Google trying to claim that their right to use the API came from the GPL. Furthermore, Google claimed that they didn't use any of Oracle's copyrighted material, so it's not possible for them to say their use of Oracle's material was licensed under the GPL, as they claim there was no use whatsoever, licensed or otherwise.</p>
<p>This is explained at length on fosspatents.com's article &quot;<a href="http://www.fosspatents.com/2013/11/q-on-dec-4-oracle-v-google-android-java.html#opensource" rel="nofollow noreferrer">Q&amp;A on the Dec. 4 Oracle v. Google Android-Java copyright hearing before the Federal Circuit</a>&quot;:</p>
<blockquote>
<p><strong>2. Q: Does this litigation involve Google's rights to use certain Java code under an open source license?</strong></p>
</blockquote>
<blockquote>
<p><strong>A: No. Google could have incorporated Java into Android on open source terms, but chose to eschew the GNU General Public License (GPL) because of its &quot;copyleft&quot; feature.</strong></p>
</blockquote>
<blockquote>
<p>[...]</p>
</blockquote>
<blockquote>
<p>If Google had ever claimed in this litigation that Android's incorporation of Java was authorized under the GPL, this would have been inconsistent with its claim that it didn't use any copyrightable material (you can only license something, on whatever terms, if it's protected) and, far more importantly, a blatant violation of Rule 11 (truthful pleading standard) resulting in sanctions for Google and its counsel. The GPL affords you four freedoms: it allows you to use software without paying for it (freedom 0), to modify its source code as you please (freedom 1), to redistribute copies (freedom 2), and to distribute your modified versions to others (freedom 3). But once you exercise freedom 3, you're subjected to the copyleft rule: you must make your modified version available under the GPL. As a result, Google would have had to publish Android under the GPL. But it did not. [...]</p>
</blockquote>
<blockquote>
<p>[...]Google seeks to exercise as much control over Android as possible. If Android had to be released under the GPL (and only under the GPL, or at least a compatible copyleft license), Google would have a hard time keeping a growing number of core Android components like its Mail and Map clients or even the new on-screen keyboard (again, more about that in the next section) closed -- and Google's hardware partners would have to release their proprietary enhancements such as Samsung's Touchwiz and HTC Sense under the GPL, which would run counter to their objective of differentiation because their competitors could then use the same code.</p>
</blockquote>
