The JDK license said:

only where Oracle has expressly included in the particular source file's header the words "Oracle designates..."

Then, is all the OpenJDK released under the GPL with CLASSPATH EXCEPTION license, or it is the responsibility of each developer to check each source to make sure he is not using a GPL class without CLASSPATH EXCEPTION? (Obviously, in a non-open source program).


1 Answer 1


I did the homework. I reviewed the Java sources and found these licenses in the files.


Sources Java 11.0.2:

I found 17,873 *.java source files in total:

  • 11,683 files with GPL "Classpath Exception" expressly designation in source header
  • 1,643 files with AFS - Apache Software Fundation License
  • 157 files with BSD License
  • 334 resource files without any kind of copyright or license
  • 7 files without any kind of copyright or license:
    • \src\java.desktop\sun\awt\windows\awtLocalization.java
    • \src\java.desktop\sun\awt\windows\awtLocalization_ja.java
    • \src\java.desktop\sun\awt\windows\awtLocalization_zh_CN.java
    • \src\java.management.rmi\javax\management\remote\rmi\RMIConnectionImpl_Stub.java
    • \src\java.management.rmi\javax\management\remote\rmi\RMIServerImpl_Stub.java
    • \src\jdk.jdi\com\sun\tools\jdi\JDWP.java
    • \src\jdk.jfr\jdk\jfr\internal\OldObjectSample.java
  • 1 file with MIT License
    • \src\java.security.jgss\sun\security\krb5\internal\crypto\dk\DkCrypto.java
  • 4,048 files with GPL license without "Linkage Exception" designation:
    • \src\jdk.aot (107 files)
    • \src\jdk.hotspot.agent (998 files)
    • \src\jdk.internal.vm.ci (181 files)
    • \src\jdk.internal.vm.compiler.management (4 files)
    • \src\jdk.internal.vm.compiler (2758 files)
    • But each of these 5 directories has a "module-info.java" file whose header contains the "Classpath Exception expressly designation", which makes it seem like the content of whole of each directory would be included in the Exception, but none file included it.
  • If your question was about the HotSpot, you should specifically ask about that. The QA I linked to also talks about it, but you could make a more specific question, e.g. "The source files of HotSpot don't contain the exception designation, but the module-info.java does ..., so what is its license?"
    – Brandin
    Jan 29, 2019 at 8:11

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.