检查 Java 版本
Java 是一种用于创建软件应用程序的编程语言。要检查本地系统中安装的 Java 版本,你可以使用一些将结果显示到控制台的命令。我们将检查 Linux 和 Windows 中的版本。让我们通过例子来理解。
在 Windows 中检查已安装的 JDK 版本
要在 Windows 中检查已安装的 Java 版本,请在命令提示符处使用以下命令。
javac -version
输出:
要检查 Windows 中的 JRE(Java 运行时环境)版本,请使用以下命令。
java -version
检查 Linux/Ubuntu 中已安装的 JDK 版本
$ javac -version
输出:
javac 11.0.13
截图是:
要检查 Windows 中的 JRE(Java 运行时环境)版本,请使用以下命令。
$ java -version
输出:
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
JDK 版本的输出取决于本地系统中安装的 JDK 版本。但是 Ubuntu 和 Windows 的命令是相同的。
相关文章
Do you understand JavaScript closures?
发布时间:2025/02/21 浏览次数:108 分类:JavaScript
-
The function of a closure can be inferred from its name, suggesting that it is related to the concept of scope. A closure itself is a core concept in JavaScript, and being a core concept, it is naturally also a difficult one.
Do you know about the hidden traps in variables in JavaScript?
发布时间:2025/02/21 浏览次数:178 分类:JavaScript
-
Whether you're just starting to learn JavaScript or have been using it for a long time, I believe you'll encounter some traps related to JavaScript variable scope. The goal is to identify these traps before you fall into them, in order to av
How much do you know about the Prototype Chain?
发布时间:2025/02/21 浏览次数:150 分类:JavaScript
-
The prototype chain can be considered one of the core features of JavaScript, and certainly one of its more challenging aspects. If you've learned other object-oriented programming languages, you may find it somewhat confusing when you start
查找已安装的 Pandas 版本
发布时间:2024/04/23 浏览次数:183 分类:Python
-
在本文中,我们将介绍如何查找已安装的 Python Pandas 库版本。我们使用了内置版本功能和其他功能来显示其他已安装版本的详细信息。
如何检查 NaN 是否存在于 Pandas DataFrame 中
发布时间:2024/04/23 浏览次数:208 分类:Python
-
我们可以使用 isnull()和 isna()方法检查 Pandas DataFrame 中是否存在 NaN。
用 jQuery 检查复选框是否被选中
发布时间:2024/03/24 浏览次数:102 分类:JavaScript
-
在本教程中学习 jQuery 检查复选框是否被选中的所有很酷的方法。我们展示了使用直接 DOM 操作、提取 JavaScript 属性的 jQuery 方法以及使用 jQuery 选择器的不同方法。你还将找到许多有用的