18

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, 2019 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, 2019 at 18:10
  • 3
    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, 2019 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. Nov 13, 2019 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, 2019 at 0:16

4 Answers 4

9

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, 2021 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, 2021 at 12:19
  • It was the version number I was mostly commenting on, so thanks for fixing that!
    – MadHatter
    Jan 4, 2021 at 12:54
8

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
  • 1
    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, 2020 at 1:30
  • 2
    OpenJDK includes JRE as well Mar 28, 2020 at 8:59
  • 1
    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, 2020 at 10:50
  • 3
    +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, 2020 at 10:55
  • 4
    "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, 2021 at 7:45
7

TLDR; Get your Java runtime from Adoptium (the new name of 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.
4
  • is that just the runtime or the entire devkit for Java because the latter one is obviously overkill for just running java software
    – My1
    Sep 9, 2021 at 11:09
  • @My1 The above applies to both the runtime (the JRE) and the devkit (the JDK). To keep things easy I would just steer clear of the Oracle distributed Java if your not interested in their commercial support unless you have some specific requirement to use it. Sep 11, 2021 at 15:39
  • 1
    okay but where do you choose to download just the runtime the website just seems to offer the jdk
    – My1
    Sep 12, 2021 at 16:27
  • You can download a msi or zip file with just the JRE by selecting your operating system in the dropdown menu here: adoptium.net/releases.html . Sep 13, 2021 at 17:44
0

This article shows Oracle's licensing arc from their Oracle Binary Code License (OBCL) to the Oracle Technology Network License Agreement which did not cover commercial use, to the Oracle No-Fee Terms and Conditions License (NFTC) which now appears to allow commercial use.

https://www.oracle.com/java/technologies/javase/jdk-faqs.html

The OBCL was in use up through Java 8u202 and the NFTC started being used for Java 17.

2
  • I don't think the issue can be summarized this simply. If you read and quote the actual term in the license, it says this: "... provided that You do not charge Your licensees any fees associated with such distribution or use of the Program, including, without limitation, fees for products that include or are bundled with a copy of the Program". That kind of term is incompatible with open source, since open source generally allows one to charge for distribution, installation, inclusion, etc. of a program.
    – Brandin
    Dec 16, 2022 at 7:25
  • 1
    So it means, in practice, that if you write your Open Source program in Java, and want to distribute that program in an open source way, that you probably won't be able to legally use (i.e. to bundle and include) the Oracle JRE with your program.
    – Brandin
    Dec 16, 2022 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.