To my knowledge, JRE is run time and JDK is for development of the Java code. But on the Tomcat server in production, there would be no development of the Java application.
So, my question is why can't we run Tomcat installing only the JRE and why is JDK installation necessary for running Tomcat?
Tomcat does not require a JDK. It needs a JRE only. JSP compilation is done by the bundled Eclipse compiler.
Because some of the functionality provided by Tomcat is only available in the JDK.
For example, jsp
pages must be parsed and any Java
code in them must be compiled on-the-fly. This is not a feature available inthe JVM
.
Edit
@Michael-O is absolutely right! Tomcat does not require a JDK. See What tomcat requires JDK or JRE? for a fuller explanation.
But note the comment here.
Tomcat 4 requires the full JDK. Tomcat 5.5 onwards will work with a JRE or a JDK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With