Java / JDK Installation

In java programming we fallow the steps given below to develop a software or application.

  1. Coding
  2. Compilation
  3. Execution

To perform above steps we requires Three essential software

  1. Code Editor
  2. JDK ( Java Development Kit )
  3. JRE ( Java Runtime Environment )
Java Installation

Code Editor

Code editor is also called test editor, it is used to type java program for example notepad, notepad++, net beans etc. there are so many code editors, you can choose any according to your comfortability. some of them listed below.

  • Notepad
  • NetBeans
  • Eclipse
  • BlueJ
  • jEdit
  • JSource
  • and more....

Download any one among from the above list and install that.

JDK ( Java Development Kit )

It stands for Java Development Kit, In JDK ready mode class and frameworks are available. With the help of those ready mode classes and framework, application can be developed immediately and it is secured.

JDK is responsible for compiling a java program.

To compile java program we need to invoke java compiler, i.e. JDK with the help of following command.

javac file_name.java

Note: Here file_name is the name provided to the text editor file while saving the program with .java extension.

  • After compilation it generates a new file at same location where you have saved the program file.
  • This new file is called as class file, this file contains byte code and the extension of file is .class
  • The name of this new file is the name of class in which main() method exist in your program.

JRE ( Java Runtime Environment )

  • It stands for Java Runtime Environment.
  • JRE is used to execute Java program.
  • In JRE there is a powerful tool which is responsible to execute program i.e. JVM
  • JRE provide environment to execute java program.

JVM ( Java Virtual Machine )

  • JVM stand for Java virtual machine.
  • To execute java program we need to invoke JRE with the help of following command.
java class_file_name

Note: This class file name is the file name of new file which is generated after compilation. Basically it is the name of class in which main() method exist.

Java Installation

To install java we need to install JDK, To install JDK visit on Oracle website and choose latest version according to your operating system and install JDK in simple steps how we install any normal software in our computer.

When we install JDK in our system two thing are get installed that are JDK and JRE

Fallow below steps to install JDK in your computer:

  1. Visit on Oracle site’s downloads section.
  2. Download JDK latest version, according to your operating system.
  3. After download install JDK software in your computer.

Environment Variable Path Setup

After successfully JDK installation the second task is to setup environment variable path, to do this fallow the steps given below.

Step 1: Copy Path

To copy the path fallow the instraction

Open → C drive → Program Files → Java → jdk → bin

Now copy the whole opened path, the path will look like

C:\Program Files\Java\jdk-11.0.2\bin

Step 2: Create Environment Variable

To create environment variable, fallow below listed steps.

  1. Right click on This PC or My Computer and then click on Properties, it will open new tab.
  2. Click on Advanced system settings which is at top left of window. Now it will open a new tab.
  3. In this new window click on Environment Variables button, again it will open a new tab.
  4. Now in new tab you can see User variables section, in this section click on new it will open a small popup.
  5. In this popup window type Path in variable name section.
  6. In Variable value section peste the path which you have copied in step 1 and then click OK button
  7. You can see a new path has added now again click OK button in path window.
  8. Now you have successfully created Environment Variable Path

Note: Now you can run any java program in your computer, so now let’s type and run our first java program in next chapter.

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)