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.
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.
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:
- Visit on Oracle site’s downloads section.
- Download JDK latest version, according to your operating system.
- 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.
- Right click on This PC or My Computer and then click on Properties, it will open new tab.
- Click on Advanced system settings which is at top left of window. Now it will open a new tab.
- In this new window click on Environment Variables button, again it will open a new tab.
- Now in new tab you can see User variables section, in this section click on new it will open a small popup.
- In this popup window type Path in variable name section.
- In Variable value section peste the path which you have copied in step 1 and then click OK button
- You can see a new path has added now again click OK button in path window.
- 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.