title: Jenkins / Maven: Could not resolve default JAVA_HOME path, Build failing
body: <p>I've got a problem regarding Java Builds in Jenkins.</p>
  
  <p>The Error I resolve is the following one:</p>
  
  <p><code>Unable to locate the Javac Compiler in:
    C:\Jenkins\jre\..\lib\tools.jar
  Please ensure you are using JDK 1.4 or above and
  not a JRE (the com.sun.tools.javac.Main class is required).
  In most cases you can change the location of your Java
  installation by setting the JAVA_HOME environment variable.</code></p>
  
  <p>I got <code>JDK1.6</code> and <code>JDK1.7</code> projects, so I need two JDK installations. For my default Java JDK I used the 1.6 for the <code>JAVA_HOME</code> variable, which points to <code>C:\Program Files\Java\jdk1.6.0_45</code>. Same for the 1.7 version, but in a separated variable (<code>JAVA_HOME7</code>).
  The <code>PATH</code> variable contains the appended <code>\bin</code> to the two  JDK versions.</p>
  
  <p>In Jenkins I also added both versions for JDK and as helper variables.
  If I am setting a concrete version for a project (e.g. <code>JDK1.7</code>), then it's building without any issues. Unfortunately I've got a lot of build-projects, so it would be time consuming to set this manually.</p>
  
  <p>I don't understand where the call or variable for the path of the error <code>C:\Jenkins\jre\..\lib\tools.jar</code> is set and where I can modify it...</p>
  
  <p>Jenkins Version: 1.509.4</p>
  
  <p>Any hints or advices how to solve this problem?</p>