When I am trying to run tomcat using startup.bat I get the following error,
The JAVA_HOME environment variable is not defined correctly
This env
To run Tomcat8 you need to have JRE_HOME defined in Env Variable.
JAVA_HOME alone will not do even if correctly set.
JRE_HOME = C:\Program Files\Java\jdk1.8.0_77\jre
You should select the JRE that is inside SDK, i.e. one with your JDK(SDK) installation. In other words your JAVA_HOME + \jre
When compiling JDK is needed to support JSP, to compile Servlets which are generated from *.jsp files. Otherwise to run JRE is needed. So when you develop you need JAVA_HOME and when you deploy you need JRE_HOME.