1

I'm developing a web application with Spring (and Spring Boot) and Open JDK 11 and I'm very confused about their licenses and how I can combine them.

Open JDK 11 is released under GPL GNU 2 (with classpath excpetion) while Spring is released under Apache 2.0 license. I read that this two licenses are incopatible: Apache 2.0 is compatible only with GPL GNU 3 so I can't release my application with GPL2. But if I choose to realease the application under GPL3, can I use in this application software under GPL2 and Apache2.0? I don't understand if the incompatible is referred to use this two licences together or just when I decide under which license release my application (in this case, I can't release under GPL2).

I know that maybe my question isn't so clear (as I said before, I'm very confused about this topic) so I leave this little scheme (it's like a box). This scheme represents what I'm asking for: if it's possibile to make something like this or not.

GPL 3 (application license)
|-----------------------------------------|
|--Included software's licence --|
|-- GPL2 ------------------------------|
|-- Apache2.0 -----------------------|
|-----------------------------------------|

Of course, if you need further informations and details, I'll try to be the clearest possible.

0

You have understood correctly that there is no license that would allow you to distribute the combination of an Apache 2 licensed work with a GPLv2 licensed work. You may create and use such a combination, you just cannot copy it outside your organization. For most web applications this would already be sufficient.


But that analysis ignores the Classpath Exception. The Classpath Exception is a LGPL-like clause:

  • If you link with the GPL + Classpath Exception covered work, you may distribute the result under a license of your choice. The GPL only applies to the GPL-covered libraries.
  • If you modify the GPL + Classpath Exception covered work, you must keep the same license.

This allows you to build software with any license on top of OpenJDK. That software is not a modified version or derived work of OpenJDK. Even if you use Java 9 features to pack parts of OpenJDK into an executable, the Classpath Exception limits the scope of the GPL to the OpenJDK parts.

However, you may still have the GPL obligations for the GPL + Classpath Exception covered works, such as providing the license and a copy of the source code to users. Just as with the LGPL. But that is not relevant for web applications because you don't give your software to users. This only starts being a concern when you distribute your software, e.g. if a customer wants to run your software on-premises or if you want to open-source your software.


Conclusion: Your web application doesn't really include or modify OpenJDK. Thanks to the Classpath Exception, this means that you can effectively ignore the GPLv2 license. You can distribute your software under the terms of the GPLv3.

  • Hi amon, thank you very much for your answer, it's very helpful! I read about the classpath license and I have only one question to verify that I've clearly understood what you told me: when my app is ready, I can realease it under any license I want (for example the Apache 2.0 or the GPL3), right? And when you talk about open-source the code, you mean to pass to a open-source license or just release the source code on GitHub or similar? – ale97dro Feb 22 at 11:51
  • @ale97dro you are not forced to publish your software, and do not have to use an open source license. If you want to, you can release your software under whatever license you want, as long as you satisfy the license obligations of all libraries etc from which your software is derived. If you include Apache 2 code, this means you must show the license, copyright notice, and possibly a NOTICE file for that code. Open-sourcing the software refers to publishing the software (incl. source code) under an open source license. – amon Feb 22 at 14:01
  • thank you very much for your help! This informations are very helpful to me! – ale97dro Feb 24 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.