How to install Java on Windows PC?

Today, we are going to learn how to install java in your windows pc.

Java is a pretty much interesting language as it offers powerful workspace & great features which makes it even more popular among most of the languages present to date.

If you are new to programming, you must be thinking that if it really a great language to start with?

Well, Java is itself a great language to learn. A new programmer who is willing to learn can easily learn this amazing language within a couple of months.

How to install Java in Windows PC?

So let’s start with:

Knowing the architecture of your PC.

To install java in your windows pc, you first need to know the structure of your windows pc.

To do so you need to follow the below-given steps:

  • Go to Start, then search for the Control Panel.
System & Settings
  • When you are inside of the control panel, navigate your self to System and Security and then to System.
System
  • There you will get your System Type which will help you decide which version of Java you should download to install in your pc. Check these images below for reference.
About system
  • In the above-given image, my pc is running over a 64-bit architecture so I need to download a 64-bit jdk.

Installing Java to Windows PC.

Now, when you have found what type of system you are using, we are a step ahead in our way to install java in windows pc.

  • Now, simply click on the installer which will soon ask you that “This program wants to make changes…”. Just click Yes & move on.
Installing Java step 1
  • You will see an Installation Wizard popping right onto your screen. Just click Next.
  • As soon as you click Next another screen saying Custom Setup will be shown.
Install java part 2
  • Click on Change. Now you can choose whichever directory you want but remember, the deeper the directory goes, the more you have to dig to reach it while you are in cmd i.e while running a program. 
Renaming the installation folder of java
  • A better way is to install it directly in a folder (named Java in the above image) in C: Drive renaming jdk 1.8…. to jdk which will save you from typing the whole version of your jdk every time you try to run a program.
  • After that, click Ok & then Next.
Custom Setup Screen
  • Just after that, another screen will appear will start installing this Environment into your system.
This image contains installation started

Run your first Program.

Now, when you have successfully installed Java in your pc, you might be thinking about how to run your first program? 

Don’t worry, we will learn in below-given points.

Bonus Point: You can use a source code editor to make your programming look a bit more professional and interesting. I recommend you use notepad++ which is a free source code editor which comes with tonnes of features. You can download it from here.

  • First of all, you need to write a source code for your program. For that, I will leave a text file. You can download it by visiting here.
Hello World Program.
  • Now, put this file in (C:>Java>jdk>bin) folder or the path where you installed java.
  • Now, open cmd and type cd/javac/jdk/bin/ which will put you to the directory where you have put the .java file.
Explanation of the Hello World Program
  • Then, type javac Hello_world.java, here, javac is a keyword to compile this program & Hello_world.java is the filename of your source code file.
  • After the program has successfully compiled java keyword will execute your program.
  • An output saying Hello world will be on your screen.
Your turn!

Now when you have figured out how to install java in your windows pc, run some java built program and show them up in the comments section.

If you have any query related to this post, feel free to share them below in the comment section.

Thank you for being here.

– Prateek Singh

No votes yet.
Please wait...
I am Prateek Singh and I have been coding and learning The Art of Programming for a while. I have been learning Java and a lot of languages by myself and I thought it would be great to share with those who too want to master this ART. Here, at Programmics, I will be sharing what I learned about this great ART and it will be great to learn together.
Posts created 13

2 thoughts on “How to install Java on Windows PC?

Leave a Reply

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

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top
Share via
Copy link