java jdk安装验证_如何查找和验证已安装的Java运行时版本?

本文介绍了如何在Windows、Linux以及在线上检查已安装的Java运行时版本。通过命令行、GUI界面以及Oracle Java提供的在线工具,可以方便地获取JRE或Java的主版本、次版本等详细信息。
摘要由CSDN通过智能技术生成
java jdk安装验证

java jdk安装验证

Java Runtime Environment is used to run Java applications. Java Runtime Environment is called JRE. There are different versions of JRE most recent major versions are 6,7,8. Some of the applications generally require a different version because of comp ability problems. In this tutorial, we will look at how to get JRE or Java versions from various operating systems. If you want to learn JRE and differences with JDK please read the following tutorial.

Java运行时环境用于运行Java应用程序。 Java运行时环境称为JRE。 JRE有不同的版本,最新的主要版本是6,7,8。 由于兼容性问题,某些应用程序通常需要不同的版本。 在本教程中,我们将研究如何从各种操作系统中获取JRE或Java版本。 如果您想学习JRE及其与JDK的区别,请阅读以下教程。

Java JDK vs JRE What Are Differences and Similarities?

Java JDK vs JRE有什么区别和相似之处?

Java或JRE版本号 (Java or JRE Version Numbers)

Java uses a bit different version numbers. All java versions first numbers is 1  actual major version numbers change according to release which is current 8 . Example Java version number is like below.

Java使用的版本号略有不同。 所有Java版本的第一个数字是1实际的主要版本号根据当前版本而变化,当前版本为8 。 示例Java版本号如下所示。

1.8.0_99

1.8.0_99

从命令行确定Windows中的Java版本 (Determine Java Version in Windows From Command Line)

We have different methods to determine Java or JRE version in windows. The first way is running java command in command line with version information. We will also provide -version option like below.

我们有不同的方法来确定Windows中的Java或JRE版本。 第一种方法是在命令行中使用版本信息运行java命令。 我们还将提供如下所示的-version选项。

> java -version
Determine JAVA Version in Windows
Determine JAVA Version in Windows
在Windows中确定JAVA版本

We can see that cırrent JRE or Java version is 1.8.0_144 . Here we can call 8 as a major version number.

我们可以看到cırrentJRE或Java版本是1.8.0_144 。 在这里,我们可以将8称为主要版本号。

通过GUI确定Windows中的Java版本 (Determine Java Version in Windows From GUI)

We can use the Java menu which resides in the Control Panel.

我们可以使用“控制面板”中的Java菜单。

Determine JAVA Version in Windows From GUI
Determine Java Version in Windows From GUI
通过GUI确定Windows中的Java版本

And then In the General tab click to About button. This will open a new window that will provide information about the current Java or JRE version.

然后在“ General选项卡中,单击“ About按钮。 这将打开一个新窗口,其中将提供有关当前Java或JRE版本的信息。

Determine JAVA Version in Windows From GUI
Determine Java Version in Windows From GUI
通过GUI确定Windows中的Java版本

We can see and get the following information.

我们可以看到并获得以下信息。

  • Version 8 specifies the main version of Java which is 8 in this example.

    Version 8指定Java的主要版本,在此示例中为8。

  • Update 144 specifies the minor version which numbered as 144.

    Update 144指定编号为144的次要版本。

LEARN MORE  Php Tutorial
了解更多PHP教程

确定Java版本Linux(CentOS,RedHat,Fedora,Ubuntu,Debian,Kali,Mint)(Determine Java Version Linux (CentOS, RedHat, Fedora, Ubuntu, Debian, Kali, Mint))

We will use java command from the command line to get information about Java or JRE installation of Linux distributions.

我们将从命令行使用java命令来获取有关Linux发行版的Java或JRE安装的信息。

$ java -version
Determine Java Version Linux (CentOS, RedHat, Fedora, Ubuntu, Debian, Kali, Mint)
Determine Java Version Linux (CentOS, RedHat, Fedora, Ubuntu, Debian, Kali, Mint)
确定Java版本Linux(CentOS,RedHat,Fedora,Ubuntu,Debian,Kali,Mint)

We can see that a lot of information about Java and the platform is provided.

我们可以看到提供了许多有关Java和平台的信息。

  • openjdk version "1.8.0_131" is the current version of Java. We can see that the Java implementation is OpenJDK which is an open version of Java for Linux distributions.

    openjdk version "1.8.0_131"是Java的当前版本。 我们可以看到Java实现是OpenJDK,它是针对Linux发行版的Java的开放版本。

  • ubuntu is the operating system where Java is created.

    ubuntu是创建Java的操作系统。

  • OpenJDK 64-Bit Server VM specifies the Java CPU architecture which is 64 bit.

    OpenJDK 64-Bit Server VM指定了64位的Java CPU体系结构。

在线确定Java版本 (Determine Java Version Online)

We can also use the currently installed Java version from the web. We will navigate to the following URL which is provided by Oracle Java. We will see a screen like below. First, we will click on the Agree and Continue button.

我们还可以使用Web上当前安装的Java版本。 我们将导航到Oracle Java提供的以下URL。 我们将看到如下屏幕。 首先,我们将单击“ Agree and Continue按钮。

https://www.java.com/en/download/installed.jsp

https://www.java.com/cn/download/installed.jsp

Determine Java Version Online
Determine Java Version Online
在线确定Java版本

For security reasons, current popular browsers have disabled the Java or JRE by default. So Google Chrome, Mozilla Firefox, etc. will show a warning like Java is disabled or not installed. If Java is enabled for browser we will see the current version of Java without a problem.

出于安全原因,当前流行的浏览器默认情况下已禁用Java或JRE。 因此Google Chrome,Mozilla Firefox等将显示警告,例如Java is disabled or not installed 。 如果为浏览器启用了Java,我们将看到Java的当前版本,而不会出现问题。

Java Disabled or Not Installed Warning
Java Disabled or Not Installed
Java已禁用或未安装

翻译自: https://www.poftut.com/how-to-find-and-verify-installed-java-runtime-version/

java jdk安装验证

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值