Java 有 openjdk-11-jre 吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52714672/
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
Is there an openjdk-11-jre?
提问by Franz Deschler
For Linux distributions, there is a package openjdk-8-jre for installing just the jre part of the openjdk 8. Is there something familiar for the latest openjdk 11 for windows? The latest openjdk versions can be downloaded at http://jdk.java.net/11/but I cannot find a way to download just the jre part.
对于 Linux 发行版,有一个包 openjdk-8-jre 用于仅安装 openjdk 8 的 jre 部分。最新的 openjdk 11 for windows 有什么熟悉的东西吗?最新的 openjdk 版本可以在http://jdk.java.net/11/下载,但我找不到只下载 jre 部分的方法。
采纳答案by Dalibor Topic
We don't provide a separate JRE download with JDK 11. Instead, you can use jlink to create a custom runtime image with just the set of modules required by your application. Please see https://docs.oracle.com/en/java/javase/11/tools/jlink.htmlfor details.
我们不随 JDK 11 提供单独的 JRE 下载。相反,您可以使用 jlink 创建自定义运行时映像,其中仅包含应用程序所需的一组模块。有关详细信息,请参阅https://docs.oracle.com/en/java/javase/11/tools/jlink.html。
回答by Justin
I've created a web-based tool to make it easier to create a custom JRE from an OpenJDK 11 implementation (such as Oracle HotSpot, Eclipse OpenJ9, or Amazon Corretto) using jlink
. The tool will give you the correct jlink
command to run depending on your needs, and this will generate the JRE 11 you're looking for.
我创建了一个基于 Web 的工具,以便使用jlink
. 该工具将jlink
根据您的需要为您提供正确的命令来运行,这将生成您正在寻找的 JRE 11。
I've also included a way to make a standard Java SE JRE 11 for those who just want a basic lightweight (~40-60 MB) JRE. If you know how to use a terminal, it'll take you less than 2 minutes to create a general-use JRE. It works for JDK 9 and up.
我还提供了一种为那些只需要基本轻量级(~40-60 MB)JRE 的人制作标准 Java SE JRE 11 的方法。如果您知道如何使用终端,那么创建一个通用 JRE 将花费您不到 2 分钟的时间。它适用于 JDK 9 及更高版本。
You can give it a shot here: https://github.com/justinmahar/easyjre
你可以在这里试一试:https: //github.com/justinmahar/easyjre
回答by Aaron
AdoptOpenJDKoffers JRE downloads for Java 8 and up.
AdoptOpenJDK提供适用于 Java 8 及更高版本的 JRE 下载。