How to Install Java?

In this tutorial, we will study how to install java, Java installation in Windows Operating System, How to check the version of installed, and Setting up Environment Variable. So let’s start.

How to Install Java?

Java has support for many platforms like Windows, Linux, Solaris, etc. These platforms have their own installation methods. In this tutorial, we will be covering the installation procedure Windows operating system for both 32-bit and 64-bit OS.

How to Install Java

Java installation in Windows Operating System

In the Windows Operating System, both 32-bit and 64-bit Windows OS have a similar way of installing Java. The main difference comes with their installation packages.

How to check the version of Java installed in the host machine?

Today’s software applications and programs need Java to run and execute properly. These software and programs require Java to be installed on the system to properly get executed. So if you have one of these applications or software installed on your computer then you possibly might also have Java already installed on your computer.

To check whether you have Java installed on your computer, follow this simple procedure,

  1. On your keyboard, press Windows + R. This will open up the Rundialog box on the bottom left of the screen.
  2. In the textbox on the Run dialog, type cmd and then click OK. This is open to the Command Prompt (CMD) window.Run dialog box
  3. In the Command Prompt, type java -version(make sure you type it correctly) and then press Enter. Java Version
  4. If you see the output similar to the output given below with some java version, then you already have Java installed on your computer and there is no need to continue with the further installation steps.Install Java
  5. In the other case, if your output in the Command Prompt is not similar to the output given above, then continue with the next step.

Step 1: Know the type of operating system you have

An important step to install Java is to know the type of operating system you have on your computer. The Windows operating system comes in 32-bit and 64-bit architecture in the market. At this point, if you know the operating system type of the host machine that needs Java installation, then you can continue to the next step. If you are not aware of the system type for your operating system, continue following these steps:

  1. Open File Explorer that comes with your Windows operating system.
  2. On the left side panel, Right-click on This PC to open the context menu and then click on Properties. File Explore
  3. This will open up the System Properties of your computer. Now, under the System section, check out the System type of your computer. System Properties

Step 2: Download the Java Development Kit (JDK)

  • Go to the official Java website and browse through the JDK packages available in the given link below.

Link: https://www.oracle.com/

  • After opening the given link, scroll down the page and click on the appropriate download link based on the host operating system that needs Java installation. Java Development Kit
  • A pop will appear for you to accept the license agreement. You can read it just in case you want to know more about their terms and conditions. If you are satisfied with the Terms and conditions/License Agreement, then select the checkbox accepting the license agreement and click on the Download button (in green). Download Java Development Kit

In case you don’t have an Oracle account, follow this link to create a new account. Link: (https://profile.oracle.com/)

  • Once the Java installer is downloaded, open the installer package, and follow the installation wizard. You can configure the installation to change the installation path if needed. But it is recommended to let the default installation settings during installation.

After completion of the installation, just repeat the part ‘How to check the version of Java installed on your computer?’ to make sure everything went well.

Setting up Environment Variable for Java

Windows operating system uses Environment variables to access externally installed applications and programs. Environment variables are Key-Value pairs. Each Key represents one or more resources or applications or programs. These Environment Variables are mostly used by the operating system and other applications to access or use an external application or program.

In this section of the tutorial, we will set environment variables in Windows operating system so that the host system can have access to Java and its libraries. By setting up Environment Variables for Java, we enable java to be used as a global command in the host machine.

Setting up the Environment Variables for Java in Windows 10?

  • Locate the Java installation on your PC. By default, Java can be located in one of these directories:

C:/Program Files/Java/jdk-<version>/bin                          – For 64-bit OS
C:/Program Files (x86)/Java/jdk-<version>/bin                – For 32-bit OS

You need to copy the location of the bin folder in the directory where Java is installed. You can make sure you have selected the right folder if it has both java and javac.

  • Open File Explorer/File Browser that comes built-in with the Windows operating system. File Explore
  • This will open up the System Properties of your computer. Locate and click Advanced system settings on the left side panel.Advanced System Settings
  1. Click on the Environment Variables button under the Advanced tab. Advance Environment Variables
  2. Under the System Variables section, locate the Path variable and double-click on it. System Variables
  3. Click on New and paste the location of the bin folder of the Java installation from step 1 and click on OK. Environment Variable
  4. You have successfully set the Java environment variable.

5 COMMENTS

  1. I just couldn’t go away your site prior to suggesting that
    I actually loved the standard info a person provide to your visitors?
    Is gonna be again regularly to investigate cross-check new posts

  2. These are in fact enormous ideas in concerning blogging.

    You have touched some nice things here. Any way
    keep up wrinting.

  3. It is perfect time to make some plans for the future and it’s time to be happy.
    I have learn this publish and if I may just I desire to suggest you
    some fascinating things or advice. Perhaps you can write subsequent articles regarding this article.
    I desire to learn more things approximately it!

  4. Currently it looks like BlogEngine is the preferred blogging platform out
    there right now. (from what I’ve read) Is that what you are using on your blog?

  5. A person essentially lend a hand to make critically articles I’d state.

    That is the very first time I frequented your website page and thus
    far? I surprised with the research you made to make this actual post amazing.
    Magnificent job!

LEAVE A REPLY

Please enter your comment!
Please enter your name here