The answer is complicated.
The following only applies to Java SE. (Not Java ME, EE, Oracle databases, etc. Not Android.)
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.
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.)
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:
- For personal use on a desktop or laptop computer, such as to play games or run other personal applications.
- For development, testing, prototyping, and demonstrating applications, including to use by/with profilers, debuggers, and
Integrated Development Environment tools.
- 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)
- With identified Oracle Cloud Infrastructure products.
The FAQ elaborates on what "personal use" means.
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.
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.