Andrew Luo andrewluotechnologies at
Tue Jan 29 20:57:28 UTC 2019

Depends on if your system is GPL-compatible or not.  The classpath exception allows you to build proprietary (or otherwise GPL-incompatible) software on top of the OpenJDK and use the Java Class Library in your software.  However, some parts of the OpenJDK are not covered under the classpath exception - the legality of using those in GPL-incompatible application will depend on a number of factors and the specific use case (for example: does your work constitute a derivative work?).  You probably want to consult with a qualified lawyer on those questions.



-----Original Message-----
From: jdk-dev <jdk-dev-bounces at> On Behalf Of Ing. Oscar Bonilla, MBA
Sent: Tuesday, January 29, 2019 7:59 AM
To: jdk-dev at
Subject: Java OpenJDK GPL license with CLASSPATH EXCEPTION

What have special the packages  jdk.hotspot.agent,, and jdk.internal.vm.compiler, which are the only source files that have GPL license but do not have the expressly "Classpath Exception" designator in the file's header (all of the source files have the GPL license)?

It is legal to use some classes of this 5 packages in a non-GPL system?
I am new here.  I am not know if this is the right mail list for this question, but I have to ask it.

The JDK license said that the GPL license with classpath exception apply only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the Classpath exception..."

I found a total of 17,873 source java files in openJDK 11.0.2, with this
11,683 files with GPL License with expressly "Classpath Exception"
1,643 files with AFS - Apache Software Fundation License
   157 files with BSD License
     1 file with MIT License
   341 resource files without any kind of copyright or License (where 334 are resource files)
4,048 files with GPL License without expressly "Classpath Exception"
designation in the source header. All in 5 specific directories:
   - \src\jdk.aot (107 files)
   - \src\jdk.hotspot.agent (998 files)
   - \src\ (181 files)
   - \src\ (4 files)
   - \src\jdk.internal.vm.compiler (2758 files)

But each of these 5 last directories has a "" file on its corresponding root path:
whose header contains the expressly the "Classpath Exception" designation, which makes it seem like the content of whole of each directory would be included in the Exception, but none of their file included it.

Then my conclusion is 2 posibilities:
1. Oracle forgot to include the "Classpath Exception designation" in each source files 2. There are some special circumstances that caused Oracle to consciously exclude them from the "Classpath Exception"


More information about the jdk-dev mailing list