Java 如何在 windows 64 位操作系统中安装 openJdk 8

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/52929234/
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:40:25  来源:igfitidea点击:

How to install openJdk 8 in windows 64 bit os

javajava-8

提问by saikrishna

I need to install open JDK in my Windows 64-bit os. I have used ORACLE open JDK and downloaded from the below link: https://jdk.java.net/8/

我需要在我的 Windows 64 位操作系统中安装 open JDK。我使用过 ORACLE open JDK 并从以下链接下载:https: //jdk.java.net/8/

While downloading I have selected Accept License Agreementand installed. But, after the installation when I tried checking the version using command java -versionit's showing like regular JDK.

下载时我选择了接受许可协议并安装。但是,安装后,当我尝试使用命令检查版本时,java -version它显示为常规 JDK​​。

Can anyone help me to get where I went wrong? Or is there any better vendor to install open JDK in windows. Thanks.

任何人都可以帮助我找到我出错的地方吗?或者有没有更好的供应商可以在 Windows 中安装 open JDK。谢谢。

回答by zawarudo

You need to set your java version in environment of you machine and target your JDK8 bin folder, or any JDK that you want to have at your disposal when you run java -version.

你需要在你的机器环境中设置你的 java 版本,并定位你的 JDK8 bin 文件夹,或者当你运行 java -version 时你想要使用的任何 JDK。

回答by avgvstvs

Currently, you can specify the version you want by changing the version in the URI: https://www.oracle.com/java/technologies/jdk8-downloads.html

目前,您可以通过更改 URI 中的版本来指定所需的版本:https: //www.oracle.com/java/technologies/jdk8-downloads.html

Jdk9, 10, 11, 12.. etc.

Jdk9、10、11、12……等等。

Haven't tested it for lower versions but that's an exercise for the reader! >=)

尚未针对较低版本对其进行测试,但这是对读者的练习!>=)

回答by Manuel Domínguez

Amazon offers an open jdk for Windows (and other OS), but just for Java 8 and 11. You can download it from here: https://aws.amazon.com/es/corretto/

亚马逊为 Windows(和其他操作系统)提供了一个开放的 jdk,但仅适用于 Java 8 和 11。您可以从这里下载:https: //aws.amazon.com/es/corretto/

After installing it and running the java -versioncommand, you will see something like this:

安装并运行java -version命令后,您将看到如下内容:

>java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment Corretto-8.242.08.1 (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM Corretto-8.242.08.1 (build 25.242-b08, mixed mode)