jdk setup
jdk setup

Java development setup, jdk 20.0.1 setup

Alex
1
1 minute, 13 seconds Read
Www.Koverstory.com

In order to run any java program you need to setup jdk in your machine first. Today we’ll learn how to setup jdk in your machine. Here we’ll install jdk 20 which the latest as per oracle website. Below are the steps –

Download the java development kit from below url for windows  https://www.oracle.com/in/java/technologies/downloads/

  1. Go to you downloads sections and double on the installer file as shown in below image – Installer filejdk setup

3. Check for java installation – Open your command prompt and test the version of installed java

in above pic we can see java version 20.0.1 has been installed.

Execute java program via command prompt

  1. Create Java program – Create a folder in any location and create a file with name Test.java like below – 2. Compile java program –  Now open command prompt at the same location where you have kept Test.java file and type  command – javac Test.java , This command will compile your java program and generate a .class file
    compile command
    compile command
    class file generation
    class file generation

    This .class file contains byte codes which can be run anywhere on any machine that’s beauty of java.

     

    3. Run you .class file , in order to run .class file you need to use command- java test

    Run Java Program
    Run Java Program

    Note- Please take care while typing , it’s case sensitive.

 

Similar Posts

Comments

Leave a Reply

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