Before we start, we should have JDK and a Text Editor installed in our PC. JDK is software for java development and, the text editor is an application where we write Java code.
What is JDK?
The Java Development Kit (JDK) is software for Java programs. The JDK is consist of JVM and the JRE.
- JVM – It stands for Java Virtual Machine, it enables a computer to run the java program.
- JRE – Java run time environment, it provides run time environment to Java Applications.
What is Text Editor (Java Editor)?
We need a Text Editor to write a java program. It is an application, where we can write and edit plain text. Most famous text editor for java code in notepad, notepad++, EditPlus, g-edit, sublime text. Instead of plain text editor, you can use an IDE (Integrated Development Environment) also for java programming. Some example of IDE is Eclipse, Netbeans, BlueJ etc.
Download and Install Java
To run the java program, our pc should have JDK(java development kit) installed. We can download the latest version of free JDK from oracle.com. After that, you have to install JDK on your computer.
Set Path (Environment)
After the installation, you need to set the environment to run the java program. To set the path, you need to find the JDK installation folder and copy the address of bin folder of JDK (generally in program files in C: drive of your PC).