How To Check Java Version – POFTUT

How To Check Java Version

Java is a very popular programming language between the open source communities. Java is used for a lot of opensource projects. To run java applications it Java Run time Environment or Java Development Kit should be installed. We can check specific version java like below.

“Java Command Not Found” Error

$java -version 

-bash: java: command not found

Oh, there is a problem. the java command cannot be found which means it is not installed or the path is not specified. In this case, it is not installed in our system. So we will install open-JRE like below.

Install Fedora, CentOS, RedHat

We will install java-1.8.0-openjdk-headless . Headless means there will be no GUI. It is also as 86 bit which is expressed as x86

$ sudo yum install java-1.8.0-openjdk-headless.x86_64 -y

Install Debian, Ubuntu, Mint, Kali

We will install openjdk-9-jre . JRE means Java Runtime Environment which version is 9.

$ sudo apt install openjdk-11-jre
Install Debian, Ubuntu, Mint, Kali
Install Debian, Ubuntu, Mint, Kali

Check Java Version

After installing Java application we will use java command with the -version option like below.

$ java -version
Check Java Version
Check Java Version

As we see we installed Open-JRE which is open source java implementation. Another alternative is Oracle JRE which is a closed source. We can see that our version is 11.0.1. We can also see that OpenJDK is 64 bit. There are also information like built environment and date which is 2018-10-16 and built on a Ubuntu system.

LEARN MORE  Vim Syntax Highlighting How To Turn On , Off

Leave a Comment