Error when starting Liferay 7 (liferay-portal-7.0-ce-ga1): PWC6345: There is an error in invoking javac.A full JDK (not just JRE) is required

后端 未结 3 925
忘了有多久
忘了有多久 2021-01-06 04:39

I am getting the following error when starting Liferay (liferay-portal-7.0-ce-ga1):

org.apache.jasper.JasperException: PWC6345: There is an error in

相关标签:
3条回答
  • 2021-01-06 05:14

    After a lot of trial and error, and a lot of searching and several Windows Environment Setting Changes, I resolved this issue. I will point to the last 2 locations that led me to get over the finish-line because I had done some many things.

    1) I made sure my JAVA_HOME pointed to my Java JDK (1.8.0_xx) and my JRE_HOME pointed to my Java JRE (1.8.0_xx)

    2) I removed the C:\ProgramData\Oracle\Java\javapath; from my PATH variables (there were 2 PATH variables, removed from both)

    3) Made sure my PATH variables (both) at the JDK Bin folder path: C:\Program Files\Java\jdk1.8.0_65\bin;

    Then I checked my CMD 'where java' and received the correct response: C:\Program Files\Java\jdk1.8.0_65\bin\java.exe

    4) In Eclipse, under the top menu: Windows > Preferences > Java > Installed JREs Here, I originally had the jre1.8.0_65, but I added the jdk1.8.0_65 and selected it.

    5) Finally, what seemed to make the biggest difference: Right-Click on your server, and at the bottom, select Properties. A window will open up, and the 3rd option, there's clickable text "Runtime Environment". Click it and a popup will open, there will be a bottom drop-down under "Select runtime JRE" Here, I selected jdk1.8.0_65

    That finally corrected the issue for me. Here are 2 links in reverse order.

    http://www.huqiwen.com/2016/05/11/liferay-7-there-is-an-error-in-invoking-javac/

    https://web.liferay.com/community/forums/-/message_boards/message/74821940?_19_threadView=tree

    0 讨论(0)
  • 2021-01-06 05:14

    you need to set proper path to JDK in environment variables and most importantly you need to download latest eclipse neon and liferay 7 work well with java 8 only so use that

    more clean and step by step tips available at

    http://www.coursedecade.com

    do watch it over that site.

    0 讨论(0)
  • 2021-01-06 05:37

    In your environment both JRE_HOME and JAVA_HOME are set. In this case Tomcat will prefer the JRE_HOME over the JAVA_HOME. JRE_HOME should point to a JRE while JAVA_HOME should point to a JDK. You could just delete the JRE_HOME environment variable and Tomcat would automatically switch to JAVA_HOME so the isseue would be solved. If you want to keep the JRE_HOME in Windows you can change the setenv.bat by adding the following line as a first line.

    set "JRE_HOME=%JAVA_HOME%"
    

    This change will tell Tomcat that the JRE_HOME should be considered equal to JAVA_HOME and will not change your environmental variables.

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