Java 从 Oracle JDK 迁移到 OpenJDK 所需的更改

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51207402/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 00:00:28  来源:igfitidea点击:

Changes required to migrate from Oracle JDK to OpenJDK

javaoraclejava-8

提问by Rehman

We are planning to migrate our project from Oracle JDK to OpenJDK. I have some questions regarding the same.

我们计划将我们的项目从 Oracle JDK 迁移到 OpenJDK。我有一些关于相同的问题。

  • After doing some analysis I found that OpenJDK will have a feature release every 6 months which is only supported until the next feature release.It's essentially a continuous stream of releases targeted to developers.Now my question is will it be a good idea to migrate to OpenJDK. Because if the above statement is correct then we need to upgrade OpenJDK in our application every 6 months

    Ref : Differences between Oracle JDK and OpenJDK

  • What are the basic changes required to do this migration. When I say basic changes, I mean I need to understand in very high level.One thing I know that is Oracle JDK and Open JDK are having different jar licences. So do I need to replace all Oracle JDK jars with OpenJDK jars as its mentioned in Migrating to OpenJDK from Oracle JDK?

  • 在做了一些分析之后,我发现OpenJDK will have a feature release every 6 months which is only supported until the next feature release.It's essentially a continuous stream of releases targeted to developers.现在我的问题是迁移到 OpenJDK 是否是一个好主意。因为如果上面的说法是正确的,那么我们需要每 6 个月在我们的应用程序中升级一次 OpenJDK

    参考:Oracle JDK 和 OpenJDK 之间的差异

  • 执行此迁移所需的基本更改是什么。当我说基本更改时,我的意思是我需要在非常高的层次上理解。我知道的一件事是 Oracle JDK 和 Open JDK 具有不同的 jar 许可证。那么我是否需要像从 Oracle JDK 迁移到 OpenJDK 中提到的那样用 OpenJDK jar 替换所有 Oracle JDK jar ?

Currently we are using :

目前我们正在使用:

  • JDK 1.8
  • Tomcat 8
  • Windows Operating System for development. Services gets deployed in linux OS
  • Maven Build tool
  • JDK 1.8
  • 雄猫8
  • 用于开发的 Windows 操作系统。服务部署在 linux 操作系统中
  • Maven 构建工具

Appreciate your help.

感谢你的帮助。

Thanks

谢谢

回答by Peter Lawrey

Now my question is will it be a good idea to migrate to OpenJDK

现在我的问题是迁移到 OpenJDK 是个好主意吗

For Java 11 you might want to, though by Java 11 they will be almost identical.

对于 Java 11,您可能想要,但在 Java 11 中它们几乎相同。

So do I need to replace all Oracle JDK jars with OpenJDK jars

那么我是否需要用 OpenJDK jar 替换所有 Oracle JDK jar

I would install a version of OpenJDK and use the JARs which came with it. I wouldn't mix and match them.

我会安装一个版本的 OpenJDK 并使用它附带的 JAR。我不会混合搭配它们。

JDK 1.8

JDK 1.8

I am not sure gain anything by migrating Java 8. Oracle Java 8 is still supported at least until Jan 2019. After that, you might not get any update, but you might not with OpenJDK either.

我不确定通过迁移 Java 8 获得什么。至少在 2019 年 1 月之前仍然支持 Oracle Java 8。在那之后,您可能不会获得任何更新,但您可能不会使用 OpenJDK。

If your concern is getting support for Java 8, I suggest contacting a company which will give commercial support Java 8 such as Azul for what seemed like a reasonable price. https://www.azul.com/downloads/zulu/zulu-windows/

如果您担心获得对 Java 8 的支持,我建议联系一家公司,该公司将以合理的价格提供 Java 8 的商业支持,例如 Azul。https://www.azul.com/downloads/zulu/zulu-windows/