How to Install Java in Windows & Linux – Java Environment Setup
So, let us start with Install Java 8.
2. Introduction to Java Environment Setup
Java is a general-purpose, object-oriented programming language. It is language that uses the classes as a base for programs.
Java applications are compiled by bytecode which runs on Java Runtime regardless of any architecture.
The following are environment settings for both Linux and Windows. JVM, JRE, and JDK every one of the three are stage subordinate (dependent) since the design of each Operating System are 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.
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 terminal. OpenJDK is a free and open source implementation of the Java.
i. We will need to install OpenJDK.
ii. In the second step we will need to 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.