Install Java on Windows & Linux – Discover Java Environment Setup

Struggling to install Java on Windows or Linux?

You are landed on the right page. Here, we will provide you a complete Java installation for windows and Linux.

So, what are you waiting for?

Java Environment Setup

Java is an object-oriented programming language. It is a language that uses classes as a base for programming. Java applications are compiled by bytecode which runs on Runtime Environment.

The following are environment settings for both Linux and Windows. JVM, JRE, and JDK are all platform dependent since the design of each Operating System are different. But, Java is platform-independent.

Stay updated with latest technology trends
Join DataFlair on Telegram!!

How to Install Java on Windows?

Follow these steps to install Java on Windows (32 or 64 Bits)

  • Step 1 – Download the JDK Java 8 from

Click on the links for Windows 32 Bit or Windows 64 Bit as required.

Download JDK

  • Step 2 – Click on .exe file, and run it. Then, follow the instructions to download it. Once it is installed, you will have to do the setup for the environment variable.

Step.1 Install Java in Windows 8

  • Step 3 – After this, you need to go to the Control Panel > System and Security > System. Under the option Advanced System Settings, we need to click on Environment variables.
  • Step 4 – Now under the System variables, we need to alter the “path” so that path for Java is also added to it and click on the Edit button.
  • Step 5 – You will need to add a path where the downloaded file is stored and then click ‘ok’.

Do you know what are the career opportunities of Java Developers?

Step 5. Install Java 8 For Windows

  • Step 6 – Save the settings and you are done.
  • Step 7 –  To learn more about it, click on the option ‘Next Steps’ and it will take you to the website.

Step 7. Install Java 8 For Windows

How to Install Java on Linux?

There are many ways to install Java on Linux, but we will go with the easiest way which is by using the terminal. OpenJDK is a free and open-source implementation of Java.

These are the steps to install Java-

  1. We need to install OpenJDK.
  2. In the second step, we will go to Application > Accessories > Terminal.
  3. Then we will need to type the command- sudo apt-get install openjdk-8-jdk
  4. In case of “JAVA_HOME” (Environment Variable), type this command in the terminal – export JAVA_HOME = /usr/lib/jvm/java-8-openjdk
  5. In the case of “PATH” (Environment Value), type this command – export PATH = $PATH:/usr/lib/jvm/java-8-openjdk/bin
  6. You are done


Congratulationsyou have successfully installed Java on your Windows/Linux machine. Hope you liked the installation process as guided by the screenshots.

12 Astonishing Features of Java, which will blow your mind.

If you find any difficulties in downloading or installing Java on your system, please share them with us through the comment section.

Did we exceed your expectations?
If Yes, share your valuable feedback on Google | Facebook

3 Responses

  1. Naresh says:

    how to install java in windows

  2. ssvkumar86 says:

    I have installed java in linux through JDK:sudo apt-get install oracle-java8-installer

    do i need to install above specified java JDK:sudo apt-get install openjdk-8-jdk in linux again?

    • Rahul says:

      If you have already installed oracle Java, no need to install open jdk again. Just check whether java is installed using following command:
      java -version

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.