title: How to set up java 10 in Eclipse Oxygen?
body: <p>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. </p>
  
  <p><a href="https://i.stack.imgur.com/vl7ik.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vl7ik.png" alt="enter image description here"></a></p>
  
  <p>Also, I tried adding maven compiler plugin as below to my pom.xml:-</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;10&lt;/source&gt;
                  &lt;target&gt;10&lt;/target&gt;
                  &lt;compilerVersion&gt;10&lt;/compilerVersion&gt;
                  &lt;fork&gt;true&lt;/fork&gt;
                  &lt;executable&gt;/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home&lt;/executable&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I also tried after setting the Run Configurations as below:-</p>
  
  <p><a href="https://i.stack.imgur.com/fflNa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fflNa.png" alt="enter image description here"></a></p>
  
  <p>Anybody knows how could I make it work for java-10.</p>
  
  <p>I tried running code below:-</p>
  
  <pre><code>public class App {
      public static void main(String[] args) {
          var list = new ArrayList&lt;String&gt;();
          System.out.println("Hello World!");
  
      }
  }
  </code></pre>
  
  <p><strong>Update:-</strong> I applied the suggested patch in comment and it still fails.</p>
  
  <p>Screenshot below:-</p>
  
  <p><a href="https://i.stack.imgur.com/jt95N.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jt95N.png" alt="enter image description here"></a></p>
  
  <p>Also, I followed <a href="https://stackoverflow.com/questions/49398894/unable-to-compile-simple-java-10-project-with-maven">this</a> post to make it compile. So, compilation actually worked from eclipse (<code>maven install</code>) but it still fails when I try to run the application.</p>