JDK is the software development kit for creating Java programs. Instructions below show you step-by-step how to install and set it up.
-
Download JDK. Install it and follow the instructions shown on the screen.
-
Now that the JDK is installed, you have to add the binary folder path of the JDK to the PATH environment variable of your MS Windows.
- Depending on the version of your MS Windows, the steps below may be different but similar.
- If you are using MS Windows XP, then open [Classic View]Control Panel->System->Advanced->Environment Variables.
- If you are using MS Windows Vista, then open [Classic View] Control Panel->System->Advanced system settings->Advanced->Environment Variables.
- Under the User variables for X(e.g. Administrator) section, search for the PATH variable. If the PATH variable is not listed, then create it. Otherwise, edit it.
- If you have to edit the PATH, then select it. Click on the Edit button and append the following line to the Variable value input field:
;C:\Program Files\Java\jdk1.6.0_06\bin
Note: There is a semicolon(;) in front and the path may be different in your case depending on the location where you did install your JDK or the version number of your JDK. The semicolon(;) is used to separated multiple paths.
- If you have to create the PATH, then click on the New button. Set the Variable name to PATH and then set the Variable value to
C:\Program Files\Java\jdk1.6.0_06\bin
Note: The path may be different in your case depending on the location where you did install your JDK or the version number of your JDK. The semicolon(;) is used to separated multiple paths.
- Click on the OK buttons.
- Open a new Command Prompt for the change to take effect and then execute the following command:
It should show the version number of your Java Compiler(javac).