不支持项目方面 Java 1.7 版

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19832348/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 20:34:13  来源:igfitidea点击:

Project facet Java version 1.7 is not supported

javaeclipseprojectfacets

提问by Imran khan

When i update my java I found the issue "Project facet Java version 1.7 is not supported" To resolve this issue follow the steps.

当我更新我的 Java 时,我发现问题“不支持 Project facet Java 1.7 版”要解决此问题,请按照以下步骤操作。

  1. Go to Ecllipse , right click on your project folder
  2. select the properties
  3. now select Project Facets ,here you will see java, click on the version and change the higher version to lower or as per your requirement .
  1. 转到 Ecllipse ,右键单击您的项目文件夹
  2. 选择属性
  3. 现在选择 Project Facets,在这里您将看到 java,单击版本并将较高版本更改为较低版本或根据您的要求。

enter image description here

在此处输入图片说明

回答by Shishir Kumar

I had also encountered the same problem a while ago when upgrading from Java version 1.6 to 1.7. To resolve this I followed below steps.

不久前,我在从 Java 1.6 版升级到 1.7 版时也遇到了同样的问题。为了解决这个问题,我遵循了以下步骤。

  1. Right Click on the Project on Project Explorer and click on Properties.
  2. Navigate to Java Build Path > “Libraries”
  3. Delete any conflicted libraries which have red cross mark on the icons.
  4. Check & edit if necessary the JRE System Library Jars.
  5. Navigate to Project Facets and select the required java version.
  1. 右键单击项目资源管理器上的项目,然后单击属性。
  2. 导航到 Java 构建路径 > “库”
  3. 删除图标上带有红色叉号的所有冲突库。
  4. 如有必要,检查并编辑 JRE 系统库文件。
  5. 导航到 Project Facets 并选择所需的 Java 版本。

Source: https://tipandtech.wordpress.com/2013/09/13/error-project-facet-java-version-1-7-is-not-supported-in-eclipse/

来源:https: //tipandtech.wordpress.com/2013/09/13/error-project-facet-java-version-1-7-is-not-supported-in-eclipse/

Try them if you have not found the solution yet.

如果您还没有找到解决方案,请尝试它们。

Shishir

石狮

回答by learner

You need to check what type of JRE is there installed in your IDE,

您需要检查您的 IDE 中安装了哪种类型的 JRE,

JRE

JRE

回答by Allan D

I've just had the same thing. My solution was to remove the 1.6 JRE in Installed JRE's and tick the Java 1.7 one.

我刚刚有同样的事情。我的解决方案是删除已安装 JRE 中的 1.6 JRE 并勾选 Java 1.7。

This can be found in Window --> Preferences --> Java --> Installed JRE's

这可以在 Window --> Preferences --> Java --> Installed JRE's 中找到

Just as Boopathi says.

正如布帕蒂所说。

回答by Javeed

When I ran into this same issue, I resolved it by changing work space.

当我遇到同样的问题时,我通过改变工作空间来解决它。

回答by Vivek

Change the jre pointed by your server(tomcat or anything...) point to a JDK instead of JRE

将您的服务器(tomcat 或任何东西...)指向的 jre 更改为指向 JDK 而不是 JRE

回答by user2369634

Double click the Tomcat server->run time environment->installed jre->select jdk 1.7

双击Tomcat服务器->运行时环境->安装的jre->选择jdk 1.7

回答by Anand Kumar

Check for the version of JDK in Window --> Preferences -->Java compiler and then set the same JDK in Window --> Preferences -->Project Facets -->Java

在 Window --> Preferences -->Java compiler 中检查 JDK 的版本,然后在 Window --> Preferences -->Project Facets -->Java 中设置相同的 JDK

回答by Akshay Salvi

1.Window Menu -> Preferences 2.On the left, select Server -> Runtime Environments 3.Highlight The server you want for your projectand select the “Edit…” button 4.On the “Edit Server Runtime Environment” dialog, change the JRE to be a Java 7 JDK or JRE. 5.Rebuild your project and the error should go away.

1.Window Menu -> Preferences 2.在左边,选择Server -> Runtime Environments 3.Highlight The server you want for your project,然后选择“Edit...”按钮 4.On the “Edit Server Runtime Environment”对话框,更改JRE 是 Java 7 JDK 或 JRE。5.重新构建您的项目,错误应该会消失。