Java has long been the leading programming language to both learn and develop in. Now while usually, developers tend towards using Linux or Linux-based operating systems for programming, there are a lot of reasons why you might want to install Java on your Windows machine.
In this article, we’re going to talk about how you can get Java up and running on your Windows 10 PC.
Also read: How to install Java in Linux?
Installing Java on Windows 10
Before we get going, we need to download the official latest Java release. We’ll just be working with the Standard Edition release. However, installation instructions are the same in case you decide on another version.
At the time of writing, the latest build is Java SE 15.
Step 1: Head over to the Oracle website to download Java.
You’ll be asked to select a version of the download. Select the file accordingly.
Step 2: Start the installer. Click on the Next button.
Step 3: You’ll be asked for an installation directory for the JDK. You can install it wherever you want but we recommend sticking with the default directory.
Wait for the installer to complete.
Step 4: You’ll see a pop-up telling you the installation is complete and that’s it, you’ve installed Java on your PC.
As a sanity check, you can open the command prompt and type in java -version and if Java’s installed correctly, it’ll show you the currently installed version.
Also read: What is the difference between C++ and Java?
Installing a Java IDE (optional)
Now if you’re going to write code in Java, it’s highly recommended that you install an IDE just as NetBeans, IntelliJ, Eclipse or something else of the sort. The installation is pretty straightforward, just like you’d install any other software. You run the setup file and it’ll take care of the rest.
Sure you can just type in your code in notepad and run it using the command prompt but using an IDE will save you a lot of time (read: headache) later when you’re debugging your code or just trying to run test cases.
Also read: How to install Python on Windows?
Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars. You can reach out to Yadullah at [email protected], or follow him on Instagram or Twitter.