This article explains how to check what version of Java is installed on your Linux system using the command line.
To solve this problem, you need to change the default Java version you are using to Java JRE 1.7 or higher (assuming that such JRE is already installed). First,check available Java versionson your Linux system by usingupdate-alternativescommand: $sudo update-alternatives --display java In this...
Check Java version on Mac. Check Java version on Windows. How to Check Java Version on Linux There are several ways to check theJavaversion on Linux. The following text presents three different methods. Method 1: java -version Command To check the Java version on Linux, run the following: ...
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: ...
Step 3: Check Java Version The JavaControl Panelprovides various options and settings. To check the version, go toGeneraltab and then click onAboutbutton: A window will open displaying the Java version installed on Mac: As it can be seen in the above image,Java 8 Update 351andBuild 1.8....
Or CentOS Linux? Let’s get started on changing default Java to JDK 9 root@crunchify:/tmp/crunchify# java -version openjdk version"1.8.0_121" OpenJDK RuntimeEnvironment(build1.8.0_121-8u121-b13-4-b13) OpenJDK64-Bit ServerVM(build25.121-b13, mixed mode) ...
Sololearn is the world's largest community of people learning to code. With over 25 programming courses, choose from thousands of topics to learn how to code, brush up your programming knowledge, upskill your technical ability, or stay informed about the
How to identify the Java version on Linux (Ubuntu): Before uninstalling java from your PC, it is essential to know which version of java you have got. To check it launch terminal by pressing“ctrl+alt+t”and type the below-mentioned command: ...
1. Install Java on Linux The first step is to make sure that you have Java installed on your system. To check the version of java installed run the following command: 1 java -version 2. Open .bashrc file The .bashrc file is a bash shell configuration file. It is stored at ~/.ba...
java -version If it works, you'll see which version of Java is installed along with some other details that may or may not be useful. If the command isn't recognized, then Java isn't on your system. Installing Java is simple. First you'll want to update your package and repository i...