Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have recently noticed that the Sun Java code has been released as GPL V2 code (see Google code repo). Does that mean that all applications written in Java and linked to Sun APIs (beans, and so on) are also in GPL ? If we strictly follow the GPL then this should be the case (Libs should be in LGPL, not GPL if we want to build proprietary software on top of it).

Is there another commercial licence which can avoid such an issue ?

I cannot believe this is the case. There must be an explanation on this.

Regards, Apple92

share|improve this question
add comment

migrated from stackoverflow.com Jun 25 '11 at 10:10

This question came from our site for professional and enthusiast programmers.

1 Answer

No, that does not mean that when you write software in Java and you use standard Java APIs, your software must also be GPL. If that were the case, then almost any code that anybody write would need to be GPL, which is obviously not the case.

The Oracle implementation of Java is under the GPL but with a special exception: the classpath exception. This means that when you link to the Oracle code (by putting it in the classpath) then you are not required to make your own code GPL.

Read the full license here: GNU General Public License, version 2, with the Classpath Exception

At the bottom, the classpath exception is explained.

(I am not a lawyer).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.
{"cc_re__cc_re__cc_by_sa_3_0": ["        <li><a href=\"http://area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"http://careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2013 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc-wiki</a> \r\n with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"footer-flair\">\r\n                <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" class=\"cc-wiki-link\"></a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2013.12.6.1206\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Programmers S", "ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2013 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc-wiki</a> \r\n with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"footer-flair\">\r\n                <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" class=\"cc-wiki-link\"></a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2013.12.6.1206\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Programmers Stack Exchange works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\"></div>\r\n    </noscript>\r\n\r\n    <script type=\"text/javascript\">var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-5620270-24']);\r\n        _gaq.push(['_set"], "copyright__copyright__copyright": ["with a special exception: the classpath exception. This means that when you link to the Oracle code (by putting it in the classpath) then you are not required to make your own code GPL.\n\nRead the full license here: GNU General Public License, version 2, with the Classpath Exception\n\nAt the bottom, the classpath exception is explained.\n\n(I am not a lawyer).\n\nshare|improve this answer\nadd comment\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.", "with a special exception: the classpath exception. This means that when you link to the Oracle code (by putting it in the classpath) then you are not required to make your own code GPL.\n\nRead the full license here: GNU General Public License, version 2, with the Classpath Exception\n\nAt the bottom, the classpath exception is explained.\n\n(I am not a lawyer).\n\nshare|improve this answer\nadd comment\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.", "with a special exception: the classpath exception. This means that when you link to the Oracle code (by putting it in the classpath) then you are not required to make your own code GPL.\n\nRead the full license here: GNU General Public License, version 2, with the Classpath Exception\n\nAt the bottom, the classpath exception is explained.\n\n(I am not a lawyer).\n\nshare|improve this answer\nadd comment\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service."]}