The original OpenJDK (and NOT any pre-built Java download from java.net) is licensed primarily under the GPL 2.0 with Classpath exception. The OPENJDK ASSEMBLY EXCEPTION also applies to some parts of the code. The net effect of this licensing is that the GPL applies to the
tools.jar but does not extend to code that would link and use
Therefore if I bundle the OpenJDK
tools.jar (assumed to be un-modified) in some of my software I would:
- comply with the GPL 2.0 attribution requirements for
tools.jar, adding the the exceptions texts.
- redistribute per the GPL the corresponding source code of the classes and binaries included in
These are rather simple requirements: yet I would refer to the GPL for the exact details of what these two item mean.
I am no longer a Java expert but I think that the source code should be available here.
Because Oracle does not make available pre-built binaries for the OpenJDK
tools.jar but instead only provide JDK binaries using another license than the GPL (a limited proprietary license called the
Oracle BCL), I would not use any pre-built binaries provided by Oracle. Instead I would compile from source the
tools.jar myself. Or, if this is available as a pre-built Jar in Maven central, before using this I would verify that this was indeed built from sources and that the exact corresponding source code is available me to redistribute alongside with my software.