Question: How to Find Java Version in Linux?
Contents

Checking the Java version on Linux

  • Open a Linux command prompt.
  • Enter the command java -version.
  • If Java version is installed on your system, you see a Java installed response.
  • If Java is not installed on your system, or the version of Java is earlier than 1.6, use the Linux Yellowdog Update, Modified (yum) utility to install a compatible version.

Procedure

  • Open a Linux command prompt.
  • Enter the command java -version.
  • If Java version is installed on your system, you see a Java installed response.

Checking the Java version on Linux

  • Open a Linux command prompt.
  • Enter the command java -version.
  • If Java is installed on your system, you see a Java installed response. Check the version number in the message.
  • If Java is not installed on your system, or the version of Java is earlier than 1.6, use YaST to install a compatible version.

Step 1: Check if JDK has been Pre-Installed

  • If a JDK version number is returned (e.g., JDK 1.x.x ), then JDK has already been installed.
  • If message “command not found” appears, JDK is NOT installed.
  • If message “To open javac, you need a Java runtime” appears, select “Install” and follow the instructions to install JDK.

How can I see my Java version?

To check your Java Version in Windows 7

  1. Open the Start menu, and click Control Panel.
  2. Type Java into the search field and double-click the Java icon. The Java Control Panel appears.
  3. Click the General tab if it is not already open.
  4. Click the About button.

How do I know if JDK is installed Linux?

1) Go to Control Panel–>Program and Features and check if Java /JDK is listed there. 2) Open command prompt and type java -version. If you get the version info, Java is installed correctly and PATH is also set correctly. 3) Go to start menu–>System–>Advanced–>Environment Variables.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest