How to know java version in windows

How to check JDK version that installed on your computer

The Java development kit (JDK) contains tools for Java development, and the Java Runtime Environment (JRE) contains a JVM to convert byte code .class to machine code, and execute it, in short, the JRE runs Java program.

Check JDK Version
We can use javac -version to find out the version of the installed JDK. In the below example, the JDK version is 11.0.7

Check JRE Version
We can use java -version to find out the version of the installed JRE. In the below example, the JRE version is 1.8.0_252

The JDK and JRE versions can be different on the same computer. Multiple JDK and JRE versions are allowed on the same computer; it is better to find out which version is configured in the system classpath to run or compile the Java program.

1. Where JDK is installed?

The JDK also contains a JRE to run the Java program.

1.1 On Ubuntu or Linux, we can use which javac to find out where JDK is installed.

In the above example, the JDK is installed at /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/ .

1.2 On Windows, we can use where javac to find out where JDK is installed.

Do I need JDK or JRE?
For end-users, they need to install JRE to run the Java program, and the JDK is for developers. For the production environment, the deployment team only need to install JRE to run the Java program. However, developers often request to install the JDK, instead of the standalone JRE on the production server, because the JDK contains JRE and also extra tools to monitor and debug the running Java program.

How to check which version of Java you have installed in Windows 10, in 2 steps

Java is a programming language that’s used to install and run programs. Chances are that there are already several programs on your Windows computer that run using Java, even if you don’t know it.

Читайте также:  Windows phone yandex music

However, if Windows isn’t running the latest version of Java, you may have trouble downloading new programs, or even opening some websites.

To check which version of Java you’re running, you’ll need to use Windows 10’s Command Prompt app. The Command Prompt can seem intimidating at first, but if you know what to type, you’ll be fine.

Here’s everything you need to know.

Check out the products mentioned in this article:

Windows 10 (From $139.99 at Best Buy)

Lenovo IdeaPad 130 (From $299.99 at Best Buy)

How to check which Java version you have in Windows 10

1. Type «Command Prompt» into the search bar next to your Start menu, and click on it when it appears in the search results.

2. Type «java -version» into the Command Prompt, then press Enter on your keyboard.

After a moment, your screen should display the information your computer has about Java, including what version you have installed.

If nothing displays, it most likely means that you don’t have Java installed on your computer at all. Luckily, you can download it for free here.

How to know java version in windows

Java is a programming language that is platform-independent, popular, simple, secure, and statically typed. Before discussing let’s clear Java language needs a runtime platform so before going ahead let’s clear how java is present on the machine.

Runtime Concepts than only we will check whether Java is there on the Platform (Operating System + Architecture)

1. Java Virtual Machine

This is a machinespecific software which is responsible for byte code on that machine and converts it into machine-specific instructions.

So as a programmer we don’t need to check presence on the machine as it is pre-installed in the machine. It is responsible for running Java code line by line.

2. Java Runtime Environment

It is simply a package that provides an environment to only run our java code on the machine. No development takes place here because of the absence of developmental tools.

3. Java Development Kit

It is also a package that provides an environment to develop and execute where JRE is a part of it along with developmental tools.

  • JDK = JRE + Developmental Tools
  • JRE = JVM + Library Classes

Now, The first and Foremost step is to check the Java Development Kit in Windows which is also known as JDK. There are lots of versions of Java. Depending upon the operating system methods there are several methods to find the version of Installed JAVA on your Machine:

Читайте также:  Драйвера для samsung r540 для windows 10

Let us discuss 3 standard methods in Windows

  1. User needs to open Command Prompt and enter- ‘java -version’
  2. Open control panel and lookup for Java
  3. Directories method- Click the Menu ‘Start’ and typing About.java or readme file

Taking one by one, showcasing in-depth individually

1. Command Prompt

The CMD (Command Interpreter is a command-line Interface. It supports a set of commands and utilities; and has its own programming language for writing batch files. Open CMD and search java -version. First, we have to an environment variable to the installed path location of the java folder. Otherwise, it will show invalid command. It is called ‘Terminal’ in the case of mac operating systems.

In the case of Windows OS: It is showing java is installed on the machine with version 1.8.0 (See carefully at line number 5)

“1.8.0_144” is the version of the java

In the case of macOS: It is showing java is installed on the machine with version 14.0.1 ( see carefully at line number 2)

Second Method:

  • Open Control Panel and there is an option of the java on the interface of the control panel
  • Click on the java option and click about a small pop window will appear

In the case of Windows:

In the case of Mac: Click on the Java icon downside. System preferences in mac are the same as the Control panel in Windows.

Third Method:

Search Program and features in the control panel and search JAVA Named option

In the case of Windows: Simply custom search- About Java

In the case of Mac:

Press the command button followed by a spacebar without lifting fingers from the command button.

A popup box will appear for less than a second followed by another pop-up as shown below:

Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.

How do I check what version of Java I have installed?

I want to check what version of Java is installed on my PC before installing the latest Java update. How can I do this?

3 Answers 3

You can check your version of Java with any of the following methods.

Java Control Panel (Windows)

  1. Open the Start Menu and select Control Panel.
  2. From the Control Panel, select Programs -> Java to open the Java Control Panel.
  1. Select About to view your current version of Java.
Читайте также:  Вам понадобится новое приложение чтобы открыть этот ms get started windows 10

Command Line (Windows)

  1. Press ⊞ Win + R and type cmd to open the Command Prompt.

  1. Type java -version and press Enter

Control Panel (Windows)

Note: This method may give inaccurate results if Java’s PATH has not been updated.

  1. Open the Start Menu and select Control Panel.
  2. From the Control Panel, select Programs -> Programs and Features.
  3. Scroll down the list of programs until you find the most recently installed version of Java

Terminal (MacOS)

  1. In the Finder, search for Terminal and launch Terminal.app

  1. Type java -version and press Enter

How to Check Java Version on Mac or Windows

PHP Code

  1. Home
  2. SysAdmin
  3. How to Check Java Version on Mac or Windows

Introduction

Java runs many of the applications that we use daily. Many applications cannot run on older versions of Java. Hence, it is essential to know which version is installed on your system.

In this tutorial, learn how to check the Java version on your Mac or Windows system.

Prerequisites

  • A system running macOS or Windows
  • Access to the command-line/terminal window
  • A version of Java installed

Check Java Version on Mac

You can find the version of Java on macOS by:

  • using the GUI (Mac’s System Preferences)
  • prompting for the version in the terminal window

Option 1: Check Java Version on Mac Using the GUI

To check the Java version on Mac without using the terminal by searching for the Java Control Panel in the System Preferences.

1. Click the Apple icon in the menu bar to open the drop-down menu and navigate to System Preferences.

2. A new window opens with various icons and settings. Find and click the Java icon to open the Java Control Panel.

3. Once the Java Control Panel opens, click the About button. A new window with Java version information should appear.

Option 2: Check Java Version on Mac Using the Terminal

If you prefer using the terminal, checking the Java version is a simple one-command process.

1. First, open the terminal. To do so, click the Spotlight Search button in the top-right of the screen.

2. Type terminal in the search bar and open it by clicking on the icon in the search results.

3. Once in the command line, run the command: java -version . The output should display the Java version installed on your MacOS.

To check the version of the primary Java compiler – javac (pronounced “java-see”) use the command:

Note: If you have a Linux system, refer to How To Check Java Version Installed On Linux.

Оцените статью