4

My application needs some classes of tools.jar.

Many sources converge to say that one cannot redistribute tools.jar from Oracle JDK without redistributing the whole bundle.

However, the case of OpenJDK's tools.jar is less clear. (the answer of https://stackoverflow.com/questions/22305686/is-it-safe-to-distribute-tools-jar-along-with-a-java-application-bundle is quite ambiguous)

https://opensource.stackexchange.com/ may know better whether one can redistribute OpenJDK's tools.jar in a bundled application or on Maven central.

2

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 tools.jar

Therefore if I bundle the OpenJDK tools.jar (assumed to be un-modified) in some of my software I would:

  1. comply with the GPL 2.0 attribution requirements for tools.jar, adding the the exceptions texts.
  2. redistribute per the GPL the corresponding source code of the classes and binaries included in tools.jar.

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.

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.