英文原文
英文原文:Get ready for more Java licensing changes | InfoWorld
Get ready for more Java licensing changes
The license for Oracle JDK 17 will revert to the Oracle Technology Network License Agreement in September, and users will have some decisions to make.
shutterstock 435558448 old clocks on brick wall time, time change, timeless
Credit: ezpick / Shutterstock
It is said that the only constant is change, which is abundantly clear with the licensing of Oracle Java. Since 2018, with the introduction of a new OpenJDK release cadence and specific long-term support (LTS) versions, we’ve seen four significant modifications to both the license conditions and pricing which have had an impact on enterprises using Java within their organizations.
Initially, we saw the introduction of the Oracle Technology Network License Agreement (OTNLA). Prior to this, everyone had considered the Java platform to be free, including maintenance in the form of regular updates. (Technically, the field of use restriction meant you would need to pay a license fee if you used Java for embedded or single-use applications.)
The OTNLA is much more restrictive. Unless you are using the Oracle JDK for personal use (like playing Minecraft), development, testing, Oracle-approved applications, or in the Oracle Cloud, you will need to pay to buy a Java SE Subscription. The OTNLA applied to Oracle JDK 8 update 211 and later, as well as Oracle JDK 11.
When the next LTS version of Java, JDK 17, was released in September 2021, Oracle introduced another significant revision to their license policy—the No Fee Terms and Conditions (NFTC). On the surface, this appeared less restrictive and states that you can use the Oracle JDK:
…for the purposes of developing, testing, prototyping and demonstrating your applications, and running the program for your own personal use or internal business operations.
What constitutes “internal business operations” is not specified in the license (or elsewhere). Based on this, many users have chosen to use the Oracle JDK 17 and subsequent updates to maintain the security and stability of their applications without the need to purchase a Java SE Subscription.
However, the NFTC comes with a time limit. According to the Oracle JDK licensing frequently asked questions,
LTS releases, such as JDK 17, will receive updates under this license for one year after the release of the subsequent LTS.
When JDK 17 was released, the cadence of LTS versions was changed to two years rather than the three years it had been previously, translating to a free period of three years for any given LTS release.
The subsequent LTS version is JDK 21, which was released 10 months ago in September 2023. This means that the free period will end in September 2024, less than two months from now. At this point in time, the license for Oracle JDK 17 will revert to the OTNLA, and users will be faced with a set of choices for their applications:
Follow the terms of the OTNLA and pay for subsequent updates, the price of which is based on how many people a company employs. According to the Java SE Universal Global Price List, this is “…all of your full-time, part-time, temporary employees, and all of the full-time employees, part-time employees, and temporary employees of your agents, contractors, outsourcers, and consultants that support your internal business operations.”
Move to the next LTS release, JDK 21. This is covered by the NFTC, so a Java SE Universal Subscription is not required. While this might seem like a simple choice, it is worth considering some of the details before opting for this:
Although Java has demonstrated excellent backward compatibility over its lifetime, there is no guarantee that your application will work as expected on JDK 21. Since JDK 9, not only have new features been added to the platform, but some older, infrequently used ones have been removed. Depending on the age and complexity of the application, this may cause issues.
Having moved to JDK 21, you will have only two years before you need to move to JDK 25 to avoid being caught by JDK 21 reverting to the OTNLA. You will then need to continue moving to the next LTS release every two years.
Move to an alternative Java distribution. One of the most powerful aspects of Java is the OpenJDK project. There is a wide choice of OpenJDK distributions, which are tested against a licensed version of the Technology Compatibility Kit (TCK). This is part of the Java SE specification and can be used to confirm that the distribution is functionally identical to Oracle Java SE. Alternative distributions of OpenJDK are still free to offer differing levels of features, support, and cost. This will undoubtedly be cheaper than option 1, typically as much as 70%, and with the appropriate vendor selection, provides the user with a considerably longer time span before needing to move to a newer version.
As you can see, there is much to consider if you use Oracle JDK 17 to run enterprise applications, especially if your users depend on them. Luckily, there is still time to plan accordingly before the next license change.
Simon Ritter is deputy CTO and Java champion at Azul.
—
New Tech Forum provides a venue for technology leaders—including vendors and other outside contributors—to explore and discuss emerging enterprise technology in unprecedented depth and breadth. The selection is subjective, based on our pick of the technologies we believe to be important and of greatest interest to InfoWorld readers. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Send all inquiries to doug_dineley@foundryco.com.
全文需要关注的三句话:
- The license for Oracle JDK 17 will revert to the Oracle Technology Network License Agreement in September, and users will have some decisions to make.(从2024年10月1日开始,Oracle将不再为JDK 17提供免费的商用许可。)
- LTS releases, such as JDK 17, will receive updates under this license for one year after the release of the subsequent LTS.(JDK 17发布时,LTS版本的节奏改为两年,而不是之前的三年,这意味着任何给定的LTS版本都有三年的免费期。)(JDK 17是2021年9月发布,刚好2024年9月结束就是免费的三年时间)
- Follow the terms of the OTNLA and pay for subsequent updates, the price of which is based on how many people a company employs.(遵循OTNLA的条款并支付后续更新的费用,其价格取决于公司雇佣的人数。)
Java收费的安装包使用的时候要闭坑
从2019年1月份开始,Oracle JDK 开始对 Java SE 8 之后的版本开始进行商用收费,确切的说是 8u201/202 之后的版本。如果你用 Java 开发的功能如果是用作商业用途的,如果还不想花钱购买的话,能免费使用的最新版本是 8u201/202。当然如果是个人客户端或者个人开发者可以免费试用 Oracle JDK 所有的版本。
Java11 的性能提升
仅通过切换到 Java 11 就有 16% 的改进,这种改进可能是因为 Java 10 中引入了 JEP 307: Parallel Full GC for G1。
具体如下:
JDK8 之前版本,仍然免费。
JDK8 免费版本到 8u202,从 8u211版本开始收费。
JDK9、JDK10,全版本免费。
JDK11,免费版本到 11.0.2,从 11.0.3 版本开始商用收费。
JDK12、JDK13、JDK14、JDK15、JDK16,全版本商用收费。
JDK17、JDK18、JDK19、JDK20,全版本(二进制版本)免费。(LTS版本发布之后的三年内免费)
选择国产JDK
国内一直流行一句话,他发任他发,我用Java8。
目前也有一些厂商升级到jdk17,我理解升级到jdk17基于以下几点考虑。
- 1.对jdk17有特殊性能场景考虑。
- 2.对jdk17新特性有充分的使用场景。
- 3.对jdk17开源协议是否收费需要考虑。
- 4.新版本的springboot需要jdk17支持。
- 5.老版本的jdk维护时间到了。
- 6.项目jdk升级成本。
科普文:如何选择jdk和jdk版本_jdk版本选择-CSDN博客
科普文:Oracle JDK收费后的常见openJDK版本梳理-CSDN博客
科普文:软件架构JDK系列之【JDK8、11、17选型】_jdk11和jdk17选哪个-CSDN博客
科普文:【支持信创、宣传国产】ARM上最好用的JDK之毕昇JDK_华为毕昇jdk-CSDN博客
科普文:【支持信创、宣传国产】腾讯 JDK Kona 正式开源_tencentkona-CSDN博客
科普文:【支持信创、宣传国产】阿里jdk龙井Dragonwell_龙井jdk-CSDN博客
实战:KonaJDK、DragonwellJDK、bisheng_jdk三款国产jdk安装和使用_kona jdk-CSDN博客
JDK17收费情况
JDK17之后的版本可以免费分发和商用,但是仅有3年时间,3年后无法免费商用。JDK17确实可以免费商用,时间截止到2024年9月,共计3年。
注意,大家需要知道的是OracleJDK17的免费和OracleJDK 8u221之前的免费存在巨大的区别:OracleJDK 8u221之前版本是可以无限期免费使用的,而OracleJDK17只有3年的免费期,期限一过,再使用就必须商业收费(前提是Oracle保持承诺,所有LTS都免费3年)。
JDK17性能分析
OptaPlanner - How much faster is Java 17?
文章从性能等对比分析11,16,17,说明为什么选择jdk17,总结如下。
全文总结
本文主要围绕 Java 17 的性能测试展开,对比了 Java 17 与 Java 11、Java 16 在不同垃圾回收器(G1GC 和 ParallelGC)下的性能表现。
重要亮点
- Java 17 与其他版本对比:Java 17 在 G1GC 下,平均比 Java 11 快 8.66%,比 Java 16 快 2.41%;在 ParallelGC 下,比 Java 11 快 6.54%,比 Java 16 快 0.37%。
- 不同垃圾回收器性能:ParallelGC 比 G1GC 快,在 Java 17 中,ParallelGC 比 G1GC 快 16.39%。
- 测试环境与方法:硬件配置为特定的英特尔处理器和内存,使用特定的 JDK 版本和 JVM 选项,每个运行解决 11 个规划问题,每个问题运行 5 分钟,进行 3 次运行取平均值。
- 测试结果的可靠性:机器重新分配的数字在相同 JDK 和 GC 的不同运行中波动较大,其他数字相对更可靠。
结论:对于 OptaPlanner 用例,Java 17 的性能提升值得升级,且 ParallelGC 仍是这些用例中最快的垃圾回收器。