title: java.lang.NoClassDefFoundError: sun/tools/javac/Main
body: <p>Trying to run sample index.jsp page in eclipse Tomcat 4 Server.
  JDK and JRE required for project are 1.5 but system JDK and JRE are 1.8</p>
  
  <p>Getting the following error:</p>
  
  <pre><code>type Exception report
  
  message Internal Server Error
  
  description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
  
  exception 
  javax.servlet.ServletException: sun/tools/javac/Main
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:481)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  
  
  root cause 
  java.lang.NoClassDefFoundError: sun/tools/javac/Main
      at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:272)
      at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
  </code></pre>