如何使JRE,编译器和建立Maven项目的路径在Eclipse中兼容
我有一个Maven项目,我需要在POM文件中设置以下内容:
<properties>
<camunda.external-task-client.version>7.17.0</camunda.external-task-client.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
我的Java的版本是11:
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
我在Eclipse中遇到了两个警告:
编译器合规性指定为1.8,但使用了JRE 11编译器合规性JRE编译器合规性问题。
构建路径指定执行环境Javase-1.8。工作空间中没有安装JRE,与此环境严格兼容。
我搜索并发现我应该从“ Windows - &gt; preverences - &gt; java”中更改“编译器合规级”,然后我更改了如下。
但是,警告仍然存在。
任何人都可以帮助我。我在Java和Maven的经验较低。
I have a Maven project in which I need to set the following in POM file:
<properties>
<camunda.external-task-client.version>7.17.0</camunda.external-task-client.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
The version of my Java is 11:
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
I encountered two warnings in eclipse:
The compiler compliance specified is 1.8 but a JRE 11 is used Compiler Compliance JRE Compiler Compliance Problem.
Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment.
I searched and found out that I should change "compiler compliance level" from "windows -> preferences -> java", and I changed it to 1.8, as following.
However, the warning still remains.
Could anyone please help me regarding this. I have low experience in Java and Maven.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论