简体   繁体   English

从 Oracle JDK 迁移到 OpenJDK

[英]Migrating to OpenJDK from Oracle JDK

我正在将我的 Java 应用程序从 Oracle JDK 迁移到 AdaptOpenJdk。那么迁移到 AdoptOpenJdk 需要进行哪些更改。

Feature parity功能奇偶校验

Oracle has committed to keeping their Oracle JDK product at feature parity with the codebase in the OpenJDK project. Oracle 已承诺使他们的Oracle JDK产品与OpenJDK项目中的代码库功能相同。 So any Java app running on Oracle JDK should run on any other platform built faithfully from the OpenJDK codebase.因此,在 Oracle JDK 上运行的任何 Java 应用程序都应该在忠实地从 OpenJDK 代码库构建的任何其他平台上运行。 You need not make any changes to your Java programming.您无需对 Java 编程进行任何更改

Be aware that OpenJDK only provides source code.请注意,OpenJDK 仅提供源代码。 For binaries and installers, you must look elsewhere.对于二进制文件和安装程序,您必须查看其他地方。 Several companies provide such binaries and installers.有几家公司提供此类二进制文件和安装程序。 One of those is a joint venture known as AdoptOpenJDK .其中之一是名为AdoptOpenJDK的合资企业。 Others include Azul Systems, Red Hat/IBM, SAP, BellSoft, Amazon, Oracle, and Pivotal.其他公司包括 Azul Systems、Red Hat/IBM、SAP、BellSoft、Amazon、Oracle 和 Pivotal。

Most of the vendors, including Oracle, provide JVMs using the HotSpot optimizing compiler and runtime.大多数供应商,包括 Oracle,提供使用 HotSpot 优化编译器和运行时的 JVM。 AdoptOpenJDK (at least) offers you a choice to obtain a build using the OpenJ9 optimizing runtime instead.采用 OpenJDK(至少)为您提供了一个选择,以使用OpenJ9优化运行时来获取构建。 Your Java app should run well on either HotSpot or OpenJ9, but you may see a different performance profile.您的 Java 应用程序应该在 HotSpot 或 OpenJ9 上运行良好,但您可能会看到不同的性能配置文件。

See my Answer to a similar Question.请参阅对类似问题的回答

Be aware that the current licensing terms for the Oracle JDK product require that for use in production you must pay a fee.请注意, Oracle JDK产品的当前许可条款要求在生产中使用您必须支付费用。 That product is free-of-cost only for non-production use such as development and testing.该产品仅可免费用于非生产用途,例如开发和测试。 If you do not want to pay such a fee to Oracle, use their unsupported product at JDK.java.net, or use a JVM provided by one of the other vendors as shown in this flowchart.如果您不想向 Oracle 支付这样的费用,请使用他们在 JDK.java.net 上不受支持的产品,或使用其他供应商之一提供的 JVM,如该流程图所示。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM