How to set up java 10 in Eclipse Oxygen?
Asked Answered
S

2

17

I am not sure if latest version of eclipse i.e. Oxygen supports java 10 or not. I configured the JRE for java 10 from preferences on my mac machine.

enter image description here

Also, I tried adding maven compiler plugin as below to my 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>

I also tried after setting the Run Configurations as below:-

enter image description here

Anybody knows how could I make it work for java-10.

I tried running code below:-

public class App {
    public static void main(String[] args) {
        var list = new ArrayList<String>();
        System.out.println("Hello World!");

    }
}

Update:- I applied the suggested patch in comment and it still fails.

Screenshot below:-

enter image description here

Also, I followed this post to make it compile. So, compilation actually worked from eclipse (maven install) but it still fails when I try to run the application.

Shani answered 22/3, 2018 at 19:22 Comment(11)
Java 10 Support for Oxygen.Inconsolable
I did not down vote, BUT that is the first link on google when input is eclipse java 10Erse
I didn't downvote, but Elliot's answer is the first thing you get by searching "java 10 eclipse oxygen" on google. This looks like either you didn't do enough research or you did but had nothing to show for it.Buddhi
I actually downloaded the latest available version 10 days ago. I thought it was the latest one. Thanks all of you for quick response.Shani
Is there any way to update the version of already installed eclipse without downloading another version of it?Shani
Also, this version of patch is only applicable to oxygen 4.7.3Shani
It don't work even after applying this patch.Shani
report to eclipse then...Erse
Yup! Agree trying to report now...Shani
Yes, Help->Check for updates.Archil
Eclipse Oxygen supports JDK 10.Monomer
S
8

So, I requested eclipse to look into it and see why the patch don't work.

Here is the answer I got

Below is the exact comment from Eclipse community:-

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

So download the supporting build from here. And see the new features of Eclipse with java 10 here.

Hope it helps!

Edit: The patch support was temporary and has been removed. So, now you need to install the latest eclipse version and it's having the support for java 10

Shani answered 28/3, 2018 at 6:19 Comment(3)
@Stefan there was a mention on eclipse website that they won't be supporting the patch anymore. So probably they have removed the thread. Updating my answerShani
I have the latest version and still some issues with Java10 and plugin-development. Related question: #24670440Allard
Yes, I think those settings are fine. If I remove JavaSE-10 from the mininum execution environments setting of my plugin, I can start it as Eclipse Application and use Java 10 features like var statement. However, I get some issues at runtime when using it in a real Eclipse instance (some classes can not be found).: #50020079Allard
V
0

The Eclipse IDE versions, and supported Java versions by IDE, listed over here:

Vanburen answered 23/4, 2022 at 10:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.