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

后端 未结 14 1958
刺人心
刺人心 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:11

    In liferay 7 : I got this error fixed by changing the runtime environment of the server from jre to jre with jdk

    0 讨论(0)
  • 2020-11-30 01:13

    As Jan Bartel suggested, from Jetty: How to configure JSP:

    by adding the line below in the start.ini-file in Eclipse, it works fine.

    -Dorg.apache.jasper.compiler.disablejsr199=true
    

    enter image description here

    0 讨论(0)
  • 2020-11-30 01:13

    I got the PWC6345 error when running a webapp with Run-Jetty-Run plugin.

    The fix was to change the Execution environments settings in Preferences. Since I'm using java 7 I needed to change the setting for JavaSE-1.7. Probably other execution environments will behave similarly.

    Window -> Preferences -> Java -> Installed JREs -> Execution environments

    Select JavaSE-1.7 on the left -> pick the *jdk*1.7.x_xx on the right hand side

    0 讨论(0)
  • 2020-11-30 01:14

    You have planty solutions guys but I thought that it exist a solution better than fix the start.ini

    I lived the same problem and then I realize that it may be because I did have a JDK7 for 64bit while I should have a JDK7 for 32.

    So I fixed my problem by downloading and use the JDK7 for 32Bit.

    Also, you would still need to

    • Use the JDK and not the JRE
    • Set your JAVA_HOME

    I am running on Windows by the way ...

    0 讨论(0)
  • 2020-11-30 01:17

    I spent good amount of time on this issue, but it turned out to be very simple. All you have to do is:
    choose the JDK instead of JRE while configuring the server runtime!

    It worked like a champ, I had this issue with glassFish 4.0

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题