≡ Menu

Linux/Unux: Verify JAVA JDK Installed Commands

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:

Tweet itFacebook itGoogle+ itFound an error/typo on this page?

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

{ 1 comment… add one }

  • sadanand December 23, 2014, 9:29 am

    ps -ef | grep -i java

Leave a Comment