title: How to make Maven use Eclipse workspace default JRE?
body: <p>I'm using Spring Tool Suite and m2e to convert some of our existing projects to Maven projects. The project in question uses jdk1.6.0_20 which is named [jdk1.6] in Eclipse. When I do Maven -> Update project, though, it replaces that jre with the standard [JavaSE-1.6].  While they seem to point to the same libraries, the change in name causes a bunch of exceptions like:  </p>
  
  <blockquote>
    <p>Access restriction: The type WindowsPopupMenuSeparatorUI is not
    accessible due to restriction on required library C:\Program
    Files\Java\jdk1.6.0_20\jre\lib\rt.jar</p>
  </blockquote>
  
  <p>My pom.xml has this:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.3.2&lt;/version&gt;
      &lt;configuration&gt;
          &lt;source&gt;1.6&lt;/source&gt;
          &lt;target&gt;1.6&lt;/target&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Is there any way to get Maven/m2e to use the default workspace JRE instead of replacing it with a specific one in the .classpath?</p>