Linux/Unux: Verify JAVA JDK Installed Commands

by on March 9, 2014 · 0 comments· LAST UPDATED March 9, 2014

Fig. 01: Make sure java is installed on a Linux/Unix based system

You can easily check jdk installed in Linux or Unix using the following commands.

Find/locate the Java binary on Linux or Unix

Type the command following command:

whereis java

Sample outputs:

java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz

Find the Java version on Linux or Unix

Type the command following command:

 
java -version
 

Sample outputs:

java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

How can I install JAVA on Linux?

If you do not see any output or error from above commands. You need to install JAVA JDK on Linux. See our tutorials for more info:

TwitterFacebookGoogle+Found an error/typo on this page? Help us!

Examples and usage: Minify and Compress CSS & Javascript Files At a Linux/Unix Shell Prompt

{ 0 comments… add one now }

Leave a Comment

Tagged as: