As per my understanding, OpenJDK itself is licensed under GNU General Public License, version 2, with the Classpath Exception which should be no issue for bundling with closed source application. However, HotSpot is licensed under GPLv2 without any linking exception (see the footer of the page and this wikipedia page).

Would I be at risk of any legal repercussion from Oracle if I bundle OpenJDK (with Hotspot by default) with my closed source commercial application?


To the best of my knowledge Hotspot and most of the JVM code (mostly C/C++ native code) in the OpenJDK is released under the GPL 2.0 with Assembly Exception and not a "bare" GPL. This is in addition to the Classpath exception to the GPL that applies mostly to the runtime library code.

The links I provided here are for OpenJDK 7, but there has not been changes in newer versions as far as I know (though I did not check this ;) )

The net effect of these combined exceptions is that I would usually consider OpenJDK a perfectly valid Java runtime to redistribute in conjunction with any application be it open source or proprietary as long as it used as-is and unmodified and of course that you comply with the GPL for the OpenJDK itself including credits, attribution and source code redistribution. (But these requirements would not apply to the app itself merely using this OpenJDK to run a a Java application).

I would go as far as saying this is in fact the only sane Java runtime provided by Oracle that you can use in conjunction with any open source or proprietary application short of buying a commercial license from them as I explained here at least for now and the foreseeable future:

The Java (JRE and JDK) binaries provided by Oracle come so many strings attached that they are practically unfit for any usage or redistribution with proprietary or open source-licensed software including GPL-licensed software.

The only sane alternative is to consider the OpenJDK which is using a combo of licenses and is primarily under the GPL 2.0 with Classpath exception which is typically considered suitable for any open source or proprietary usage. See below for some pointers to OpenJDK pre-built binaries or build it yourself...

Update 2016-12: Actually the latest news is that Oracle is now enforcing commercial licensing and commercial audits if you do not use an OpenJDK.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.