如何在 Eclipse Oxygen 中设置 java10?
How to set up java 10 in Eclipse Oxygen?
我不确定最新版本的 eclipse 即 Oxygen 是否支持 java 10。我根据 mac machine 上的首选项为 java 10 配置了 JRE。
此外,我尝试将如下所示的 maven 编译器插件添加到我的 pom.xml:-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>10</source>
<target>10</target>
<compilerVersion>10</compilerVersion>
<fork>true</fork>
<executable>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home</executable>
</configuration>
</plugin>
我在设置 运行 配置后也试过如下:-
任何人都知道我如何让它适用于 java-10。
我试过 运行ning 下面的代码:-
public class App {
public static void main(String[] args) {
var list = new ArrayList<String>();
System.out.println("Hello World!");
}
}
更新:-我在评论中应用了建议的补丁,但仍然失败。
截图如下:-
此外,我按照 post 编译。所以,编译实际上是从 eclipse (maven install
) 开始的,但是当我尝试 运行 应用程序时它仍然失败。
因此,我请求 eclipse 对其进行调查,看看为什么补丁不起作用。
Here是我得到的答案
以下是 Eclipse 社区的准确评论:-
Note: This feature patch is disabled. It was originally intended to be
installed on top of 4.7.3 builds. Now, the Java 10 support is available on
the downloads page via the 4.7.3a builds. The earliest build that is
supporting this feature can be downloaded from
因此请从 here. And see the new features of Eclipse with java 10 here 下载支持版本。
希望对您有所帮助!
编辑:补丁支持是临时的,已被删除。所以,现在你需要安装最新的 eclipse 版本,它支持 java 10
Eclipse IDE 版本,以及 IDE 支持的 Java 版本,在此处列出:
我不确定最新版本的 eclipse 即 Oxygen 是否支持 java 10。我根据 mac machine 上的首选项为 java 10 配置了 JRE。
此外,我尝试将如下所示的 maven 编译器插件添加到我的 pom.xml:-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>10</source>
<target>10</target>
<compilerVersion>10</compilerVersion>
<fork>true</fork>
<executable>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home</executable>
</configuration>
</plugin>
我在设置 运行 配置后也试过如下:-
任何人都知道我如何让它适用于 java-10。
我试过 运行ning 下面的代码:-
public class App {
public static void main(String[] args) {
var list = new ArrayList<String>();
System.out.println("Hello World!");
}
}
更新:-我在评论中应用了建议的补丁,但仍然失败。
截图如下:-
此外,我按照 maven install
) 开始的,但是当我尝试 运行 应用程序时它仍然失败。
因此,我请求 eclipse 对其进行调查,看看为什么补丁不起作用。
Here是我得到的答案
以下是 Eclipse 社区的准确评论:-
Note: This feature patch is disabled. It was originally intended to be installed on top of 4.7.3 builds. Now, the Java 10 support is available on the downloads page via the 4.7.3a builds. The earliest build that is supporting this feature can be downloaded from
因此请从 here. And see the new features of Eclipse with java 10 here 下载支持版本。
希望对您有所帮助!
编辑:补丁支持是临时的,已被删除。所以,现在你需要安装最新的 eclipse 版本,它支持 java 10
Eclipse IDE 版本,以及 IDE 支持的 Java 版本,在此处列出: