“PWC6345: There is an error in invoking javac.” error when using Jetty WTP plugin to deploy a JSP page on Jetty

后端 未结 14 1986
刺人心
刺人心 2020-11-30 00:54

I\'m trying to deploy a JSP-page on Jetty, using the Jetty WTP plugin for Eclipse. But I get the error below. It looks like Jetty can\'t find javac. Is there an

14条回答
  •  孤独总比滥情好
    2020-11-30 01:19

    I too happened to suddenly get the org.apache.jasper.JasperException: PWC6345 with my Eclipse installation and the Jetty Maven Plugin (which I use to start up Jetty from within Eclipse).

    The reason was that I updated my JDK installation shortly before. Inside Eclipse, this caused to change the "Installed JRE" to point to a plain JRE installation instead of a full-fledged JDK installation. A JDK installation is needed for Jasper, as Jasper needs javac (which is not provided by JRE).

    In my case, the solution was to provide Eclipse with the JDK installation. To do so, select Window -> Preferences -> Java -> Installed JREs. Here, click Add..., then point to your JDK installation (in my case, JRE home should point to C:\Program Files (x86)\Java\jdk1.7.0_17). Click Finish. Then back in the Installed JREs overview, remove the old JRE reference and select the newly added JDK installation.

提交回复
热议问题