Java Development Kit
The Java Development Kit (JDK) is provided by Sun Micro systems and is popularly used by Java programmers worldwide. The purpose of JDK is to provide the software and tools required for compiling, debugging and executing java applications. The JDK software and documentation are freely available at Sun’s official web site.
Java Standard Edition, popularly called Java SE, is a technology and platform that provides support to build applications that have high functionality, speed and reliability. Java SE development kit, popularly called JDK, includes the necessary development tools, run time environment, and APIs for creating Java programs with the Java platform.
JDK includes two important tools:
Javac [option] source
Source is one or more files names that end with the extension .java
Java [option] class name [arguments]
Class name is the name of the class file.
To work with the JDK and java programs, certain settings need to be made to the environment variables. Environment variables are pointers pointing to programs or other resources. The variable to be configured are:
PATH: The PATH variable is set to point to the location of java executable (javac.exe, java.exe.) This is necessary so that the javac and java command can be executed from any directory without having to type the full path.
Setting path in DOS:
Setting path in Windows
Right-click the computer icon present on the desktop.
Click on properties.
Click Advanced tab.
Click Environment variables.
In the system variable area, select the PATH variable.
Click Edit button.
Enter the path of the bin folder of jdk 7 or jdk 8
CLASSPATH is an environment variable that specifies the location of the class files and libraries needed for the java compiler (javac) to compile applications.
Setting CLASSPATH in DOS:
Setting CLASSPATH in windows
Right-click my computer icon present on the desktop
Click on properties. Click advanced tab
Click on environment variables, and then in system variables area click on new
Type CLASSPATH in variable name and then type c:\jdk (jdk version) as value.
Click on ok.
More: While setting PATH and CLASSPATH variables in a system, log on as system administrator, otherwise the system variables area is disabled. CLASSPATH is also required by the java interpreter (java) to interpret and run the applications.