How to Install Java in Windows & Linux – Java Environment Setup
So, let us start with Installation of Java 8.
2. Introduction to 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 Java 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 is different. But, Java is platform independent.
Read more about Features of Java Programming Language
3. How to Install Java 8
a. Install Java 8 For Windows
i. Download the JDK Java 8 from
Click on the links for Windows 32 Bit or Windows 64 Bit as required.
ii. 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.
iii. 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.
iv. 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.
v. You will need to add a path where the downloaded file is stored and then click ‘ok’.
vi. Save the settings and you are done.
vii. To learn more about it, click on the option ‘Next Steps’ and it will take you to the website.
b. Install Java 8 For Linux
There are many ways to install Java in 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.
i. We need to install OpenJDK.
ii. In the second step, we will go to Application > Accessories > Terminal.
iii. Then we will need to type the command which is given below
sudo apt-get install openjdk-8-jdk
iv. In case of “JAVA_HOME” (Environment Variable), type the command given below in the terminal.
export JAVA_HOME = /usr/lib/jvm/java-8-openjdk
v. In case of “PATH” (Environment Value), type the command given below in the terminal.
export PATH = $PATH:/usr/lib/jvm/java-8-openjdk/bin
vi. You are done.
In this tutorial, we learned how to install Java – Java Environment Setup for Windows and Linux. With this, we can run the program on both the networks. Furthermore, if you have any query, feel free to ask in a comment section.