JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on. It also includes browser plugins for Applet execution.
JDK: It’s the full featured Software Development Kit for Java, including JRE, and the compilers and tools (like JavaDoc, and Java Debugger) to create and compile programs.
Usually, when you only care about running Java programs on your browser or computer you will only install JRE. It’s all you need. On the other hand, if you are planning to do some Java programming, you will also need JDK.
Sometimes, even though you are not planning to do any Java Development on a computer, you still need the JDK installed. For example, if you are deploying a WebApp with JSP, you are technically just running Java Programs inside the application server. Why would you need JDK then? Because application server will convert JSP into Servlets and use JDK to compile the servlets.
Download JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
How to Setup JDK
1. Run .exe file of JDK, You will have Welcome wizard for Java SE Development.
2. Select Optional features to install from the list below. Select Development Tools, Also select the path to install JDK. Tab Next
3. Installing….., Copying Files, Extracting Installer.
4. Select path to install JRE – Java Runtime Environment.
5. Installing JRE on system.
With Java JDK and JRE you will now be able to code your own Java applications. Remember that java can be executed on various operating systems such as Windows, Linux or Mac OS X. On our next article we will show you how to install Eclipse for Java development.