gpt4 book ai didi

java - 无法创建 Liferay 插件项目

转载 作者:行者123 更新时间:2023-11-30 03:51:28 25 4
gpt4 key购买 nike

我是 Liferay 宇宙的新手,我正在尝试创建一个 portlet,但 Eclipse 抛出此错误:

Error Creating Liferay plugin project, please see eclipse error log for more details.

我检查了 .log 文件:

!ENTRY com.liferay.ide.project.core 4 0 2014-06-21 23:56:42.463
!MESSAGE Error creating Liferay plugin project.
!STACK 1
org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
at (......)
!MESSAGE One or more constraints have not been satisfied.
!STACK 1
org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
at (......)
Contains: Liferay Portlet 6.0 requires Java 1.5 or newer.
Contains: Dynamic Web Module 3.0 requires Java 1.6 or newer.
!SUBENTRY 2 org.eclipse.wst.common.project.facet.core 4 0 2014-06-21 23:56:42.465
!MESSAGE One or more constraints have not been satisfied.
!SUBENTRY 3 org.eclipse.wst.common.project.facet.core 4 0 2014-06-21 23:56:42.465
!MESSAGE Liferay Portlet 6.0 requires Java 1.5 or newer.
!SUBENTRY 3 org.eclipse.wst.common.project.facet.core 4 0 2014-06-21 23:56:42.465
!MESSAGE Dynamic Web Module 3.0 requires Java 1.6 or newer.

我使用的是 Java 1.7(也尝试过 1.8),所以我不明白这个错误可能来自哪里。这是我的配置:

- eclipse 开普勒-Tomcat 7(Liferay 6.2 CE)-java 1.7/1.8

谢谢你们的帮助:)

最佳答案

解决方案是转到
Windows->首选项->java->编译器
编译器合规级别中确保其为 1.7,如果它的 1.7 将其更改为某个较低的值并按“确定”,则再次将其更改回 1.7 它应该可以工作。

关于java - 无法创建 Liferay 插件项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24346699/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com