Take the 2-minute tour ×
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

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

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.