Setting JAVA_HOME for Maven on Windows 10
<p>I recently upgraded to Windows 10. I'm trying to create a new maven project in eclipse, but it doesn't seem to be picking up my JAVA_HOME setting.</p>

<p>Here is the JDK installation directory:</p>

<p><img src="https://i.stack.imgur.com/HdLLJ.png" alt=""></p>

<p>And here is my JAVA_HOME environment variable setting:</p>

<p><img src="https://i.stack.imgur.com/blSok.png" alt=""></p>

<p>If I run <code>mvn -version</code> in a command prompt, maven does seem to get the correct value for JAVA_HOME:</p>

<p><img src="https://i.stack.imgur.com/hkj2m.png" alt=""></p>

<p>I then try to create a new maven project in eclipse, using a barebones pom.xml:</p>

<pre><code>&lt;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"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;StaticVoidGames&lt;/groupId&gt;
    &lt;artifactId&gt;DatabaseTest&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;DatabaseTest&lt;/name&gt;
&lt;/project&gt;
</code></pre>

<p>But the project's JRE is 1.5 for some reason:</p>

<p><img src="https://i.stack.imgur.com/ENePB.png" alt=""></p>

<p>For what it's worth, my eclipse workspace default JRE is the same as my JAVA_HOME setting.</p>

<p>I've tried manually changing the build path to use the correct jdk, but it simply reverts. I've tried cleaning the project, doing a maven update, restarting eclipse, restarting my computer, and creating a new project. Maven still chooses Java 1.5, which isn't even installed on my machine.</p>

<p>All of my googling says that maven should pick up the JAVA_HOME setting to figure out which Java to use, but that doesn't seem to be the case here. Is there another setting that I'm missing somewhere?</p>