本文介绍了启动Liferay 7(liferay-portal-7.0-ce-ga1)时出错:PWC6345:调用javac时出错.需要完整的JDK(不仅仅是JRE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动Liferay(liferay-portal-7.0-ce-ga1)时出现以下错误:

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

我已正确设置系统环境变量:

  • JAVA_HOME:C:\ Program Files \ Java \ jdk1.7.0_80
  • JRE_HOME:C:\ Program Files \ Java \ jre7

我已将JAVA_HOME路径添加到系统路径变量中:

I have added my JAVA_HOME path to my system Path variable:

  • ....; C:\ Program Files \ Java \ jdk1.7.0_80 \ bin;

当我运行Windows where javac 命令时,得到以下信息:

When I run the windows where javac command, I get the following:

C:\ Program Files \ Java \ jdk1.7.0_80 \ bin \ javac.exe

C:\Program Files\Java\jdk1.7.0_80\bin\javac.exe

我想念什么?我也尝试使用JDK 1.8和JDK 1.7.0_79.结果相同.

What am I missing?? I have also tried using JDK 1.8 and JDK 1.7.0_79. Same results.

感谢您的帮助!

推荐答案

经过反复试验,大量搜索和Windows环境设置更改,我解决了此问题.我将指出导致我越过终点线的最后两个位置,因为我做了很多事情.

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)我确保我的JAVA_HOME指向我的Java JDK(1.8.0_xx),并且我的JRE_HOME指向我的Java JRE(1.8.0_xx)

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):我删除了C:\ ProgramData \ Oracle \ Java \ javapath;从我的PATH变量中删除(有两个PATH变量都从这两个变量中删除了)

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

3)确保JDK Bin文件夹路径中的PATH变量(均为):C:\ Program Files \ Java \ jdk1.8.0_65 \ bin;

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

然后,我检查了CMD'where java'并收到了正确的响应:C:\ Program Files \ Java \ jdk1.8.0_65 \ bin \ java.exe

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

4)在Eclipse中,在顶部菜单下:Windows>首选项> Java>已安装的JRE在这里,我最初有jre1.8.0_65,但是我添加了jdk1.8.0_65并选择了它.

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

5)最后,看起来最大的区别是:右键单击服务器,然后在底部选择属性".将打开一个窗口,第三个选项是可单击的文本运行时环境".单击它,将打开一个弹出窗口,在选择运行时JRE"下将出现一个底部下拉列表,在这里,我选择了 jdk1.8.0_65

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

这终于为我解决了这个问题.这是2个反向顺序的链接.

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

这篇关于启动Liferay 7(liferay-portal-7.0-ce-ga1)时出错:PWC6345:调用javac时出错.需要完整的JDK(不仅仅是JRE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 16:47