4

I am working on an open-source project that is governed by the Apache License 2.0, and I want to make use of Java source code from OpenJDK 11, which is governed by the GPL 2 license with classpath exception.

Although this page on the Apache site says that AL 2 is not compatible with GPL 1 and GPL 2, it does not say anything about GPL 2 with classpath exception.

My question is really an extension of this great question. Can source code under GPL 2 with classpath exception be used within a project that is under Apache License 2?

3

1 Answer 1

3

Can source code under GPL 2 with classpath exception be used within a project that is under Apache License 2?

No.

The only way that code under the Apache 2 license and code under the GPLv2+Classpath can coexist in one application is when the GPLv2+Classpath code lives in a separate module that gets loaded via Java's Classpath mechanism.

In all other situations, the Classpath Exception does not kick in and the analysis for why the Apache and GPLv2 licenses are incompatible applies. And the result of incompatible licenses is that you can't use the software.

3
  • This helps a lot. Thanks for the explanation, Bart. And by OpenJDK source code, I mean a few methods from the class' source code for which custom implementations are provided. So, in such a case, does the GPL v2 with Classpath exception apply at all? Thanks again, as much as I'd want to upvote your answer, I don't have the reputation to.
    – Varad G
    Jul 13, 2023 at 18:16
  • @VaradG, yes, even when copying just a few lines you need to observe the GPL license. Jul 13, 2023 at 19:07
  • Understood Bart, thank you!
    – Varad G
    Jul 14, 2023 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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