Skip to main content

Java installation on windows

Setting  Up  JDK On Windows 11: A Step by Step Guide



Introduction : 

The Java Development Kit (JDK), which offers the components required to create, compile, and execute Java applications, is a vital tool for Java developers. We'll guide you through installing JDK and configuring the environment on a Windows 11 computer in this article.

Download and Installation Steps :

Step 1 :  
Go to the download page for Oracle JDK:
Visit the Oracle JDK official download page at : https://www.oracle.com/in/java/technologies/downloads/

Step 2: Accept the License Agreement:

Scroll down to find the list of available JDK versions. Accept the license agreement by clicking on the checkbox next to "Oracle JDK" and choose the appropriate version for your system.

Step 3 : Download the Installer:
 Click on the download link for the installer that matches your operating system. For Windows, it typically has a filename like `jdk-17.0.1_windows-x64_bin.exe`.

Step 4 : Run the Installer:
 Once the download is complete, run the installer. Follow the on-screen instructions to install the JDK. You can choose the default installation path or specify a custom one.

Image Views of Above Steps :



Configuring System Environment Variables :

After installing the JDK, you need to set up the system environment variables to make Java commands accessible from the command line.
 
Step 1: Find the JDK Installation Path: 
Locate the folder where JDK is installed. By default, it is something like :C:\Program Files\Java\jdk-1.8 

Step 2 : Right-click on "My Computer" and select "Properties".


Step 3 : Click on the "Advanced" tab. 


Step 4: Click on the "Environment Variables" button.

Step 5 : Under "System Variables", click on "New".

Step 6: In the "Variable Name" field, type "JAVA_HOME".
In the "Variable Value" field, type the path to the root folder of the Java Development Kit installation on the computer.


Step 7 : Click "OK". 


Testing the Setup :

Now Java Path has been set up. Open the Command prompt and type "javac" In case you have already open up the command prompt, I suggest you to close the existing window and reopen it again.


To ensure that your Java environment is set up correctly, create a simple Java program and compile and run it.

Step 1. Create a Java File:
Open a text editor and create a file named `HelloWorld.java` with the following content:

public class HelloWorld {
       public static void main(String[] args) {
           System.out.println("Hello, World!");
       }
   }

Step 2 : Compile and Run:

Open a command prompt, navigate to the directory containing `HelloWorld.java`, and run the following commands:

javac HelloWorld.java
java HelloWorld

 If everything is set up correctly, you should see the output "Hello, World!".

Congratulations! You have successfully downloaded and set up the JDK on your Windows 11 system. You are now ready to start developing Java applications. 

Note : If any doubt  click on  : Contact Us 

Know about which are best IDE's for programing click me !




Comments

Popular posts from this blog

Unveiling the Magic of Model View Template (MVT) in Django | Django Tutorial

Demystifying Model View Template (MVT) in Django Introduction: Have you ever wondered how Django manages to handle data, logic, and user interface? Dive into the world of Model View Template (MVT) architecture to unravel the secrets behind Django's framework. Understanding MVT: Breaking Down the Components  MVT, also known as Model-View-Template, comprises three essential components: the model, the view, and the template. The model handles the data logic, the view processes user requests, and the template manages the user interface. Let's dissect each component to grasp their intricate roles and interactions within the Django framework. Model: The Backbone of Data Handling  In MVT, models are synonymous with templates, simplifying the software design process. They are pivotal in organizing and managing data and templates, streamlining the development journey. Furthermore, the model in Django serves as the representation of the database lo...

Interface - Object Oriented Programming : Java

Table of Content Introduction What is Interfaces in Java Why Interfaces are important Some Important Point To Be Noted Syntax Java Interface Examples Introduction :  In the dynamic world of Software Development , Object Oriented Programming (OOP's) stands as a cornerstone for building robust , scalable applications . One of the key features that empowers OOP's is the concept of interfaces. In this article , we will discuss the interfaces and exploring how they enhance code modularity and flexibility. What is Interfaces in Java?  Java interfaces provide an abstraction archiving mechanism. The Java interface can only include abstract methods; method bodies are not allowed. In Java, it is used to archive both multiple inheritance and 100% abstraction.  Stated differently, it is possible for interfaces to contain abstract variables and methods. There cannot be a method body for it.  It s...

"Python programiTutorial Part 2: "

  Hey guys , Welcome back in new post Python Tutorial part-2 . Lets start the remaining part here.. First Python Program: Before starting a code we have to install python on your machine for more about installation click me We will discuss the basic syntax of python. now firstly we will see the first and simple "HELLO WORLD "program. Run this program. Python provides us two way to run the program: 1.Using Interactive interpreted command prompt. this is image of Interactive interpreted command prompt with the "HELLO WORLD" program with output. 2.Using a script file. This is the image of  script file with the code of "HELLO WORLD ' program with out put.  Script mode has some advantages and disadvantages : 1.We run multiple lines of code at a time in script mode.  2.Run and interpretation process or debugging is easy in the script mode. 3.It is best for beginners and expert also. Disadvantages:-...