1

As there is vast difference between JDK and JRE.

JRE is useful in running and executing java programs while JDK is for development.

My question is that if we are deploying web-app created in java on any server what is the role of JDK in server.

Except the application is build on JSP then it requires JDK for compiling servlet into class files as per JSP life cycle but what if application is not in JSP.

Can we run other web application(Except JSP) successfully in server only with JRE and if answer is no then what is the role of JDK in server ?

While installing server if we link SERVER JRE then can we get better performance instead JRE ?

Satyam Koyani
  • 4,236
  • 2
  • 22
  • 48
  • jdk = X + jre, you don't need JDK on server unless you want to use any dev tools on server (compiler, jconsole, etc) – jmj Jan 24 '14 at 04:47

1 Answers1

2

JDK contains the JRE which is the runtime environment for your java programs. When you are deploying a web application (say in a production box) it would most likely contain pre-compile JSPs so in reality you do not need a JDK even for your jsp based application, but in case your JSPs are not pre-compiled (e.g. in a development/test environment), then you would need a compiler which comes in JDK only.

Assuming that you just have a JAR file (and obviously it contains only class files), you would need only JRE to run this, not the JDK.

aryann
  • 909
  • 5
  • 11