11

United States here. I have a client that I would like to build a small suite of Java 8+ applications for to be installed on their office desktops and servers. This requires the Java Runtime Environment (JRE) to be installed on all of those computers/servers as well.

Their IT department is telling me that installing Java will require a license & fees for the JRE.

Googling myself I have found a mixture of answers, none of which are definitive.

Some articles state that Java is and will continue to be totally free for commercial use, with the exception of certain optional add-ons like Mission Control and Flight Recorder.

Other articles state that as of January 2019, Java will require licenses for commercial use.

Other articles state that different rules will be applied to different versions of the JRE.

Which is it? If there are rules/conditions based on the versions, what are they?

8
  • 1
    This is not a legal question really but yes java is free for the end user. – Putvi Nov 13 '19 at 18:08
  • Thanks (+1) It's a licensing question, and licensing/IP is (I believe...maybe I'm wrong!) absolutely on topic here. Also @Putvi I appreciate you weighing in here, but do you have any definitive articles you could point me to? I can't go back to their IT department and say, "Hey guys, this dude named Putvi on StackExchange says its free, so it must be!" If you could give me more ammunition to work with it would be greatly appreciated! – hotmeatballsoup Nov 13 '19 at 18:10
  • 2
    IIRC if you want Oracle supported Java (commercially), you need a licensing agreement. Otherwise you need to switch to OpenJDK. If you just want the JRE for a business, it's pretty murky. I imagine Oracle will want you to pay. – pboss3010 Nov 13 '19 at 18:47
  • 2
    I'm voting to close this question as off-topic because doesn't seem to be about free/open source software. – curiousdannii Nov 13 '19 at 22:53
  • 2
    Part of the answer is that there does exist a version of the JRE that is licensed under the GPL (OpenJDK), so questions about that version (and, by extension, at least some consideration of how it contrasts with a commercially-licensed version) seems on-topic, though this question doesn't make that FLOSS-specific context very apparent, and the extent to which this question can be answered within the on-topic bounds of this site is probably not the full scope of the question as written. – apsillers Nov 14 '19 at 0:16
7

There're several different JRE available with different licenses. Two most prominent are:

As for JDK, OpenJDK is still free and GPL. Oracle JDK does not look as free anymore (https://java.com/en/download/faq/distribution.xml).

So, if you stick to OpenJDK (there's no many reasons why you can't/shouldn't) - it would be free.

7
  • so does that mean, to be free we need to use OpenJDK and Oracle JRE? Or does the OpenJKD have the JRE as well? – JackDev Mar 27 '20 at 1:30
  • 2
    OpenJDK includes JRE as well – Alexander Pushkarev Mar 28 '20 at 8:59
  • The Oracle license in your link states free usage for development purpose, but is you intend to use it in production, you should pay I think. It's still unclear for me if the JRE and JDK shares the same licensing policy, if yes, then JRE is paid for Oracle. – рüффп Aug 28 '20 at 10:50
  • 2
    +1 for recommending OpenJDK which is free whatever version you use. We already switched all our systems from Oracle to OpenJDK and the switch was quite smooth. – рüффп Aug 28 '20 at 10:55
  • 2
    "I am not a lawyer, but as far as I understand, it is still free for usage." - Only for certain kinds of usage. Commercial use is almost certainly not free. See my answer for the (bare) details. – Stephen C Jan 8 at 7:45
4

The answer is complicated.

  1. The following only applies to Java SE. (Not Java ME, EE, Oracle databases, etc. Not Android.)

  2. From Java 9 onwards, most Java distros do not come in a JRE only form.
    However, there is no distinction between JRE and JDK in what the licenses permit.

  3. There are many different providers of Java. Each one (in theory) can have different license terms. However we can simplify this to:

    • Oracle Java is subject to Oracle's proprietary licenses
    • OpenJDK-based Java is subject to GPLv2 + "Classpath exception"1.
    • Some other proprietary Java releases may be subject to other (3rd-party) licenses. (I am not going to cover these, since it is most likely not relevant to the OP.)

Oracle Java

Java 8 and older releases that were released prior to April 16, 2019 allow free use for any purposes.

All releases since April 16, 2019 require a subscription be paid, unless your usage is are covered by the following exclusions. (The following text is taken from the Oracle Java SE Licensing FAQ.)

For full information and terms, refer to the OTN License Agreement for Java SE. The OTN License Agreement for Java SE for current Oracle Java SE releases allows them to be used, without cost:

  1. For personal use on a desktop or laptop computer, such as to play games or run other personal applications.
  2. For development, testing, prototyping, and demonstrating applications, including to use by/with profilers, debuggers, and Integrated Development Environment tools.
  3. For use with some approved products, such as Oracle SQL Developer, or as an end user of a software application created by an approved product. (referred to as “Schedule A” and “Schedule B” Products in the OTN License Agreement for Java SE)
  4. With identified Oracle Cloud Infrastructure products.

The FAQ elaborates on what "personal use" means.

OpenJDK-based Java

This includes the official OpenJDK binary releases, and any other releases built (by 3rd-parties) from the OpenJDK sources or a derivative.

These Java releases are covered by the GPLv2+classpath license. There is no fee for their use, and there are no limitations on what the software can be used for.

Your customer

If your customer is using an old Oracle Java release (prior to April 16, 2019), they can continue to use without paying a fee. (If they upgrade to a current release, it changes.)

If your customer is using an OpenJDK-based release, they can use it without paying a fee.

If your customer is using a current Oracle release (including recent Java 8 releases) they will probably need to pay for Java SE Subscription. They could avoid this by switching to an OpenJDK-based release.


1 - The Classpath exception is amendment to the GPL that relaxes the GPL's restriction concerning (dynamic) linking with non-open code. The effect is to mean that Java code that you write and then build / run using OpenJDK Java is NOT constrained to have any specific license. The "Classpath" name is a reference to the GNU Classpath project.

3
  • "OpenJDK-based Java is subject to GPLv3 + "Classpath extension"" I suspect you mean GPLv2 + linking exception. – MadHatter Jan 4 at 12:17
  • I do. I believe that it is officially called the Classpath exception as an acknowledgement to its origins. – Stephen C Jan 4 at 12:19
  • It was the version number I was mostly commenting on, so thanks for fixing that! – MadHatter Jan 4 at 12:54
3

TLDR; Get your Java runtime from AdoptOpenJDK. It basically uses the same sources as the Oracle JDK and is licensed as GPLv2 with classpath exception.

I understand this must all seem quite confusing.

As of January 2019 you will need a license for commercial use of the Oracle JRE (what was known as the "original" Sun JRE) from Oracle. I'm not a lawyer so what "commercial use" encompasses in the view of Oracle I'll leave to the lawyers.

The Oracle JRE is mostly just a distribution of OpenJDK. OpenJDK is actually the name of the project when Sun opensourced their Java (ie. what is now Oracle JRE) as GPLv2 with classpath exception. I say "mostly" because some parts of the Sun's Java couldn't be opensourced because Sun themselves licensed them from other parties. For example the font rendering engine was such a component. This was replaced with an opensource alternative in OpenJDK. This encompasses a very small amount of functionality. And the functionality is still there in OpenJDK, it's just provided by different implementations.

So why would you want to use Oracle's Java implementation? Well if you have software which only works with the original Java JRE. This doesn't happen very often but there is some badly written Java software out there which does some dumb assumptions about the JRE it is running on. Or if you want the commercial support Oracle offers.

For completeness there are also other Java distributions you can use:

  • Amazon Corretto Amazon's OpenJDK distribution.
  • OpenJ9 This actually offers a different JVM (Java runtime) then OpenJDK does. It is the opensourcing of IBM's Java runtime implementation called J9 which replaces Hotspot (the OpenJDK JVM).
  • All Linux distributions, all the BSD's (FreeBSD, OpenBSD, etc), etc. all distribute their own package of OpenJDK.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy