[英]Java: invalid source release: 9
I have created a maven project in IntelliJ, I downloaded the dependencies that I need and I can see there are no errors in the code.我在 IntelliJ 中创建了一个 maven 项目,我下载了我需要的依赖项,我可以看到代码中没有错误。
I am still getting this error even though I have set Java 8 in project
in Project Settings
即使我在
Project Settings
中的project
中设置了 Java 8 我仍然收到此错误
This is what my pom.xml looks like:这就是我的 pom.xml 的样子:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>multithreadedCalls</groupId>
<artifactId>multithreadedCalls</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.10</version>
</dependency>
</dependencies>
</project>
Just change java version on the second screenshot只需更改第二张截图上的 java 版本即可
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.