top

Search

Java Tutorial

.

UpGrad

Java Tutorial

How to Install Java in Windows 10

Introduction

One of the most popular programming languages, Java is an object-oriented, multi-platform, versatile, network-based language. Irrespective of whether you are an amateur programmer or an expert in programming languages, Java is the perfect programming language to start your programming journey. This is because of its features like vast community support, simplicity of learning, reusability, and so on. 

Here’s your guide on how to install Java in Windows 10, diving into which you’d learn about its installation and can use it for app development, scientific applications, etc.

Overview

The tutorial provides a comprehensive guide on how to install Java in Windows 10. It will explain the importance of installing and setting up the Java Development Kit (JDK). We will then explore the installation process in a step-by-step manner. It begins with verifying if Java is already installed, and if not, we will begin by first downloading the JDK from the Oracle website.

Additionally, the tutorial will cover how to set the permanent path for Java, enabling the execution of Java commands from the command line. It provides instructions on accessing system properties, advanced system settings, and environment variables to set up the Java path.

Features of Java

Let’s look at some features of Java which help it to stand out from other programming languages:

  • It is a simple programming language with similar syntaxes used in C++ or C. 

  • Java doesn’t have any ‘pointers’ concept, thus removing any confusion for the learners.

  • It is a platform-independent programming language. This means you can use the codes you’ve written on Java in another system.

  • It is an object-oriented language where everything is defined with respect to objects and classes.

  • It is a robust programming language. This indicates that if your program is terminated unexpectedly, Java can handle it without struggle.

  • Being network-centric, Java allows distributed computing.

JavaFX Environment

Before you install Java Windows, the primary step is to set up the JavaFX environment. It is a platform that helps to create and deliver applications that run smoothly across multiple devices. It supports desktops, web browsers on any platform, like Linux, Windows, macOS, etc. You need to install Java JDK because all the successors of Java JDK 1.8 support JavaFX. 

Install Java

Here are the simple steps for Java JDK download and how you can install Java JDK in your system.

Step 1: Verify that it is already installed or not

Before you can install Java in your system, you need to check whether it is already in the system. To do so, type ‘cmd’ in the search bar and tap ‘enter’. This opens up the command prompt.

Run the command ‘java –version’, and it will return an output message stating if Java is already installed.

Step 2: Download JDK

For the latest Java JDK download, visit the Oracle Java page, and navigate to the Downloads section. Once you reach the Downloads page, look for the x64 Installer download link and click on it. You will find it under the Windows category. 

Step 3: Install JDK

Once you have downloaded the file, move to these next steps:

  • Look for the ‘downloaded file’ option and click on it.

  • Select option ‘Next’.

  • Choose the option ‘Development Tools’ and select the option ‘Next’.

  • Wait while the setup is finished.

  • Choose your preferred destination folder to install Java Windows. Select ‘Next’. 

  • Wait while installation is completed.

  • Now the Java SE development kit is successfully installed in your system. Click on the ‘Close’ option, and you’re ready to run Java.

Step 4: Set the Permanent Path

To install Java from the command line of Windows 10, you need to fix the Java Path. To set it up, you should follow the given steps:

  • Open the File Explorer by pressing Win + E.

  • Right-click on "This PC" or "My Computer" and select "Properties" from the context menu.

  • Click "Advanced system settings" in the System window on the left sidebar. This will open the System Properties window.

  • Click the "Environment Variables" button at the bottom in the System Properties window.

  • You'll see two sections in the Environment Variables window: User variables and System variables.

  • Scroll down under the System variables section and find the "Path" variable. Select it and click on the "Edit" button.

  • Click the "New" button and add the path to your Java installation directory. For example, if you installed Java in the default location, you can add "C:\Program Files\Java\jdk1.8.0_161\bin" (replace the version number with your installed version).

  • Click "OK" to save the changes and close all the windows.

  • With this step, you have successfully set up Java Path. Now you need to reopen the Command Prompt and write the command ‘javac’.

  • Another new window appears, and now Java download for Windows 10 and its installation is completed. To run JavaFX applications, you must configure the IDEs or Integrated Development Environments.

Conclusion

Here in this tutorial, we have explained how you can install Java in simple and easy steps. Once you have installed Java on your device, you can explore it and its range of applications. You can use it to develop any mobile application, desktop application, web development, enterprise software, and more. Once you have installed Java, you can learn its fundamentals and advanced concepts on a reliable online platform like upGrad. 

FAQs

1. How to install Java in Windows 11?

The installation process for Java in Windows 11 is the same as in Windows 10. You can also follow the steps in this tutorial for Windows 11.

2. Is Java for Windows available free of cost?

Yes, you can download and install Java free of cost. You only have to go to its official website and download it following the steps given in this guide.

3. Does Java run on all platforms?

Yes, Java can run smoothly on a range of platforms. It is the simplest programming language, which you can run on Mac OS, Windows, Linux, Ubuntu, and so on.

Leave a Reply

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