再次执行java -version命令,如果成功显示Java的版本信息,则表示配置成功。 3. 验证Java环境变量的配置 为了确保我们的Java环境变量配置正确,我们可以使用以下代码进行验证: publicclassJavaVersionCheck{publicstaticvoidmain(String[]args){StringjavaHome=System.getenv("JAVA_HOME");StringjavaVersion=System.getProperty("...
First,check available Java versionson your Linux system by usingupdate-alternativescommand: $sudo update-alternatives --display java In this example, there are four different Java versions that are installed: OpenJDK JRE 1.6, Oracle Java JRE 1.6, OpenJDK JRE 1.7 and Oracle Java JRE 1.7. The d...
参考了以下文章:https://www.howtouselinux.com/post/create-a-directory-in-linux,我们将继续深入探讨更多创建目录的方法和使用建议。 方法一:使用mkdir命令 优点:mkdir是一个简单且直观的命令,可以快速创建单个目录或多级目录。 示例: 代码语言:shell AI代码解释 mkdirmy_directory 代码语言:shell AI代码解释 mkdir...
-v 或--invert-match:反向选择,即显示不包含匹配文本的所有行。-V或--version:显示版本信息。-w 或--word-regexp:只显示全字符合的列。-x--line-regexp:只显示全列符合的列。-y:此参数的效果和指定"-i"参数相同。 实例 1)在当前目录中,查找后缀有 file 字样的文件中包含 test 字符串的文件,并打印出...
Step 3. Install OpenJDK Java 18 The Java OpenJDK version 18 is already included in the Ubuntu 22.04 repo. So we install it, we need to execute the following command: sudo apt-get install -y openjdk-18-jdk Once installed, execute the following command to check the Java version: ...
How to Check Java Version on Mac There are two methods to check Java version on macOS based system: 1: Through GUI 2: Through Terminal How to Check Java Version through GUI on Mac To check Java version on a Mac via graphical user interface follow the steps mentioned below: ...
DownloadLiberica JDK Pick a version, package type, JDK/JRE, and download the binaries. Release notes Installation guide Supported Configurations Terms of use Source code Windows Liberica 21.0.7+9, Windows 64 bit, Standard Mac Liberica 21.0.7+9, macOS 64 bit, Standard ...
DownloadLiberica JDK Pick a version, package type, JDK/JRE, and download the binaries. Release notes Installation guide Supported Configurations Terms of use Source code Windows Liberica 21.0.7+9, Windows 64 bit, Standard Mac Liberica 21.0.7+9, macOS 64 bit, Standard ...
Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT.
You should now have a working Java installation. In order to confirm this, you can runjava -version, to check the version of Java that is now available in your environment: java-version Copy Note:Most of the time, command-line arguments are preceded by one dash for single-letter arguments...