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

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

    I got this error when deploy war package to our server.

    My deploy command is (applied web container you may find):

    java  -jar jetty-runner.jar  --port 8020 xx.war
    

    I write this answer because it confused me almost one day. I tried some methods above but failed.

    Finally I found there is only jre on my servers but not full jdk.

    $ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-2.b11.el7_3.x86_64
    jre
    

    I fix it with searching available jdk and install one.

    $yum search java | grep 'java-'
    $sudo yum install java-1.8.0-openjdk-devel.x86_64
    

    (Notice the -devel)

提交回复
热议问题