How to Download and Install JDK and JRE?
Do you want to run Java programs, or do you want to develop Java programs? If you want to run Java programs, but not develop them, download, and install JDK or the Java Runtime Environment. If you want to develop Java applications, download, and install JDK or the Java Development Kit. The JDK includes the JRE, so you do not have to download both separately.
If you are a Mac user you do not need to download the JDK, the version of Java that is pre-installed on the Mac OS X Leopard is JS2E 1.5. This version can be updated through the automatic software updater to Java SE 6.
Visit Java Download Website
Download the latest version of the Java JDK or JRE from above link according your requirement.
Double-click on the downloaded file Click next, then read and accept the license and follow the instructions for installing the JDK.
After the installer is finished, open run by clicking Start > Run or use shortcut by typing Windows Key + R.
In the Run box, type "cmd" and click "OK".
A Command Prompt window should be opened.
- Click anywhere in the window, type "javac" and press enter.
- If it shows many more options and lines, Congratulations! You have successfully installed JDK.
- If the prompt returns something along the lines of: "javac is not recognized as an internal or external command, operable program or batch file" then you will need to set Path and Class Path.
In my next tutorial I'll tell you What is the meaning of PATH and CLASSPATH?.