I am developing a software that comes bundled with JDK. I am planning to use JetBrains OpenJDK for this purpose as it comes with swing support for HighDPI monitors.

JetBrains OpenJDK can be found in this repository: https://github.com/JetBrains/jdk8u. It is covered by GPL-2.0 with Classpath Exception. I plan to use their precompiled version of JDK found on https://bintray.com/jetbrains/intellij-jdk/. The extracted archive would be located in the JDK subdirectory of the installation of my software.

Would distribution of my software which is covered by the custom license and is closed source be legal if I distribute JetBrains JDK with it?

1 Answer 1


Your software does not fall under the GPL because you benefit from the Classpath exception. But you want to distribute an unmodified OpenJDK alongside your software. What license does this bundle (your software + OpenJDK) fall under?

The GPL v2 states:

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

Therefore: if you bundle OpenJDK with your software, the GPL will not apply to the bundle as whole.

However, your bundling should make it clear that the GPL software is independent. This OpenJDK installation should be independently usable. If your bundle contains any EULAs or other license information, they should make it clear that these only apply to some parts of the bundle, and that the OpenJDK is free software under the GPL.

When you distribute a GPL software, you will have to comply with the GPL for that distribution. This is simple for verbatim copies of the source code. If you distribute binaries you'll have to conform with section 3. This requires you to give access to the source. (a) You can either include the whole OpenJDK source in your bundle, which is probably impractical. (b) You can include a written offer to send a copy of the source upon request. (c) You can pass on such a written offer that you received, but ONLY for noncommercial distribution. Since your distribution seems commercial in nature, that only leaves option (b):

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; […]

Is it enough to point to the JetBrains Github repo? I don't think that satisfies the license because that repo is not under your control and may be deleted. Forking that repository may be sufficient, though it's still your responsibility and not Github's to keep the source available.

The safest way to satisfy the license is to offer the source code in the same way that you offer your bundle which includes OpenJDK. E.g. if you have a web page with a download link for your bundle, offer a download with the OpenJDK source code on the same page. This download must not be access protected. Then keep that website running while you offer that bundle plus at least three years.

The GPL says explicitly that offering a separate download for the source next to the download of the executable is OK:

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.


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.