INSTALL JDK | SET ENVIRONMENTAL VARIABLE | JAVA_HOME |RUN JAVA PROGRAM IN EDITOR

 

INSTALL JDK | SET ENVIRONMENTAL VARIABLE | JAVA_HOME |RUN JAVA PROGRAM IN EDITOR



Steps to Download and install JDK - Set Environmental Variable and Java_Home - Run java program with the help of command prompt.

blog4

What is JDK?

JAVA DEVELOPMENT KIT

The JDK incorporates tools beneficial for improving and examining programs written in the Java programming language and executing on the Java platform.
Three core technology packages used in Java programming are the Java Development Kit (JDK), JVM (Java Virtual Machine), and the JRE (Java Runtime Environment). The JDK enables any developer to create java programs that can be compiled and executed by the JVM and JRE. JRE is a software bundle or a package of tools of Java that formulates the JVM. JVM is the platform of Java that runs the program.

blog4diagram

Steps to follow :

Step 1: Download JDK
To download JDK click here


blog4


Step 2: Install JDK


blog1

Step 3: Set Environmental Variable

Search environmental Variable in Search Bar OR Right click on my PC > properties >Advance System Setting OR Follow this path Control Panel > System and Security > System > Advance System Setting blog1


Click on Environmental Variables
Go to System Variable

blog1

Select Path of bin folder and copy it to the path of system varible

blog4

Set JAVA_HOME for third party programs. Copy path to variable value for variable name JAVA_HOME.

blog4

Click ok.

Open Notepad and write any program in java. Save it with .java extension.

Open command Prompt.
Copy the location where java file is located.
Compile java program using javac command followed by filename with java extension.

blog4

Run java program use java command followed by filename. Look for the output.

blog4


Done !

No comments:

Post a Comment