How to verify if java is installed on the computer and get version detail


The best and the easiest way to check if Java is being installed on your system is by using the Command Prompt on Windows or Terminal if you're on Mac OS X or any other Linux/Unix flavor.

macOS / Linux / Unix :

Open Terminal and type the following command :

$ java -version

If java is being installed on the system you will get a response with the version details,

$ java -version

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

$
Mac OS X check java installed version using terminal.png
Mac OS X check java installed version using terminal.png
On Windows: XP/7/Vista/8/10

Open Command Prompt and type the following command,

c:\> java -version

If it is installed you should get the ver details as the response of the command,

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

The other ways to check if Java is installed :

For Windows XP
  1. Click on Start.
  2. Now Select Control Panel
  3. Get Java version.png
    Get Java version.png
    Check java installed on Mac OS X.png
    Check java installed on Mac OS X.png
  4. Under Control Panel → Add/Remove Programs
  5. Check in Add/Remove control panel list of softwares installed contains Java with version.
For Windows 7/Vista
  1. Click on Start
  2. Now Select Control Panel
  3. Now Click on Programs and Features
  4. Check if there is Java version included.
Windows 8
  1. Goto Control Panel
  2. Under Control Panel select Programs
  3. Now Click Programs and Features
  4. Check if installed Java version is listed.
On Mac OS X Lion/Snow Leopard/Mavericks/Yosemite
  1. Goto System Preferences (you can do a spotlight search to get there)
  2. Check if you can see Java Icon
  3. Click on the Java icon
  4. Click on About button to get the version details





Recent Posts:
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.