Check if java jdk is installed

How to check the Java version installed on your PC

First of all, you must know that Java is a programming language and you need some packages installed on your computer to run it. Before we check for any version you must know what are you looking for. So let’s see some definitions in the Java world.

  • Java -> “Java” is the name that Sun gave to their programming language. Java is NOT an acronym and it does NOT stand for “Just Another Vague Acronym” or anything like that. This is the main programming language that is used to develop software, programs, apps, or any other fancy stuff.
  • JRE ->Java Runtime Environment this is the installation package that provides an environment to (YES) run and NOT to develop the Java applications. This is normally used by end-users. If you are unsure about what kind of java you are looking for, THIS is what you are looking for.
  • JDK ->Java Development Kit witch contains just the tools for developing apps under Java.
  • SDK -> Software Development Kit which has support for developing apps in different programming languages like Scala, JRuby, and Java among others. It is often used in Android development for example.
  • JVM ->Java Virtual Machine normally comes with both JDK and JRE and it’s the one in charge of executing the Java language code in general.

How to check Java package/JRE version

There are a few methods out there to find under the hood Java version that you have installed on your PC. Windows lets you directly search for the Java components under Start Button. Just type java and look for Java Configuration. Click on it and you should see the Java Configuration panel:

Java configuration panel

Click on the About Java menu and a new window with the Java version will open

find Java version in the about section

You can also try and type About Java directly into windows search to access the “about java” section and check its version

How to check Java version using CMD

Another way to do it is using CMD (Command Prompt). Just search for it under your windows bar start button or press the Windows button + R and type CMD

Find CMD under windows

Type java -version inside CMD window. If you have Java installed you will see something like this.

get java version using command prompt

java -version error – No Java Installed

On the other hand, if you do not have Java installed you will see a java is not recognized as an internal or external command message

Читайте также:  Html style block in body

java is not recognized as an internal or external command

If you see this error, just head to the java website at java.com to download the latest Java package.

Check if JDK is installed and his version

To simply check if JDK is installed just type javac in your terminal and you should see lots of available commands

check if JDK is installed

If you have The JDK installed, just type java -version in your terminal and this will bring up the JDK version

check JDK version

Check SDK version

Just to make it clear, SDK stands for Software Development Kit which has support for developing apps in different programming languages, not just JAVA. It is used by Microsoft and Google Android for example.

Check Microsoft SDK version

To check for your windows installed SDK version you should open your registry editor and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows. To open Registry editor press the Windows button + R, write regedit, and press ENTER.

Источник

How to verify java version and java installation

Once you have installed java in your system, the next step is to check whether it has been installed properly or not. This tutorial explains the steps to check java installation in your system. It covers both the cases, first if Path variable for java is not set and second if Path variable for java is set after installation.

1. If Path variable is not set, to check if java is installed properly or not, open a command terminal like CMD, Secure Shell Client etc. and change or move to the java installation directory upto bin folder, now execute the command java -version . It will display the installed java version and other relevant information about java. Java compiler version can also be checked by executing javac -version command.

check java version

The image above shows the steps for checking java installation in Windows operating system using CMD terminal. Similarly for linux based operating system, execute the same command in any linux based terminal to check java installation.

2. If Path is set, no need to move to java installation directory, just execute the command java -version in any directory. It will display the installed java version and other relevant information about java. For compiler version execute javac -version command.

java version

If any of the above methods returns the version correctly, which means java is installed properly. Now you can start your first program in java.

How do I know if Java is installed on Windows 10 ?

The steps are same irrespective of which version of windows you are using. Just follow above steps to check if java is installed on windows 10 or not.

If java is not installed, it will display an error message in Windows like «java is not recognized as internal or external command, operable program or batch file» after executing the command.

java not installed

What to do if I am getting error message like above «java is not recognized as . » ?

There are two reasons of above error message, First java is not installed at all, you should install java and Second java is installed but Path variable is not set properly, you should set Path variable for java.

The following figure shows a typical structure of java installation directory in windows operating system. The installation directory could be different in different OS because it completely depends on OS and programmers selection as where to install java.

Читайте также:  Установить java development kit jdk

java installation directory

How to check where is java installed in windows/linux ?

In window, execute where java command in CMD to get the java installation directory. In linux, to get the java installation directory execute which java command in a terminal.

Does Windows 10 need Java ?

Yes if you want to develop/run java programs or application otherwise no.

Can I remove Java from my PC ?

Yes if it’s no longer needed, you can uninstall java in same way as you uninstall any other software.

How do I know if I have Java JDK installed ?

Just execute java -version and javac -version command as given above inside a terminal to see if java jdk is installed or not. If these commands returns version of java and java compiler, it means java jdk is installed on your system.

  • You must be in bin directory of jdk to check java installation if Path variable is not set.
  • As a good practice you should always set your path variable first before you start writing programs in java.
  • You can execute java -help command on terminal to get different usage of java command.
  • Once you set the path of java, you need to restart the cmd(if already open) to get the correct result of java -version or javac -version command.

Источник

How to check the Java version installed on your PC

First of all, you must know that Java is a programming language and you need some packages installed on your computer to run it. Before we check for any version you must know what are you looking for. So let’s see some definitions in the Java world.

  • Java -> “Java” is the name that Sun gave to their programming language. Java is NOT an acronym and it does NOT stand for “Just Another Vague Acronym” or anything like that. This is the main programming language that is used to develop software, programs, apps, or any other fancy stuff.
  • JRE ->Java Runtime Environment this is the installation package that provides an environment to (YES) run and NOT to develop the Java applications. This is normally used by end-users. If you are unsure about what kind of java you are looking for, THIS is what you are looking for.
  • JDK ->Java Development Kit witch contains just the tools for developing apps under Java.
  • SDK -> Software Development Kit which has support for developing apps in different programming languages like Scala, JRuby, and Java among others. It is often used in Android development for example.
  • JVM ->Java Virtual Machine normally comes with both JDK and JRE and it’s the one in charge of executing the Java language code in general.

How to check Java package/JRE version

There are a few methods out there to find under the hood Java version that you have installed on your PC. Windows lets you directly search for the Java components under Start Button. Just type java and look for Java Configuration. Click on it and you should see the Java Configuration panel:

Java configuration panel

Click on the About Java menu and a new window with the Java version will open

find Java version in the about section

You can also try and type About Java directly into windows search to access the “about java” section and check its version

How to check Java version using CMD

Another way to do it is using CMD (Command Prompt). Just search for it under your windows bar start button or press the Windows button + R and type CMD

Читайте также:  Кросс валидация на питоне

Find CMD under windows

Type java -version inside CMD window. If you have Java installed you will see something like this.

get java version using command prompt

java -version error – No Java Installed

On the other hand, if you do not have Java installed you will see a java is not recognized as an internal or external command message

java is not recognized as an internal or external command

If you see this error, just head to the java website at java.com to download the latest Java package.

Check if JDK is installed and his version

To simply check if JDK is installed just type javac in your terminal and you should see lots of available commands

check if JDK is installed

If you have The JDK installed, just type java -version in your terminal and this will bring up the JDK version

check JDK version

Check SDK version

Just to make it clear, SDK stands for Software Development Kit which has support for developing apps in different programming languages, not just JAVA. It is used by Microsoft and Google Android for example.

Check Microsoft SDK version

To check for your windows installed SDK version you should open your registry editor and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows. To open Registry editor press the Windows button + R, write regedit, and press ENTER.

Источник

How to check JDK version that installed on your computer

check JDK version

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

 $ java -version openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~19.10-b09) OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode) 

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.

 $ which javac /usr/bin/javac $ ls -lsah /usr/bin/javac /usr/bin/javac -> /etc/alternatives/javac $ ls -lsah /etc/alternatives/javac /etc/alternatives/javac -> /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/javac $ cd /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/ $ ./javac -version javac 11.0.7 

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.

 Microsoft Windows [Version 10.0.18362.900] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\mkyong>which javac 'which' is not recognized as an internal or external command, operable program or batch file. C:\Users\mkyong>where javac C:\opt\jdk-11.0.1\bin\javac.exe 

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.

References

Источник

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