What is the difference between jdk and jre

5th Dec 2016, 6:44 AM
v hari prasad
v hari prasad - avatar
1 Answer
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. JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on. contain set of library and tools 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. I am sure there might be more examples.
5th Dec 2016, 7:14 AM
Mahesh BudhaThoki
Mahesh BudhaThoki - avatar