title: Eclipse issue with Maven build and JDK when generating Qclasses in Querydsl
body: <p>When I add this code below in my <code>pom.xml</code> to support <strong>Querydsl</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
    &lt;groupId&gt;com.mysema.maven&lt;/groupId&gt;
    &lt;artifactId&gt;apt-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.0.6&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt; 
        &lt;goals&gt;
          &lt;goal&gt;process&lt;/goal&gt;
        &lt;/goals&gt;
        &lt;configuration&gt;
          &lt;outputDirectory&gt;target/generated-sources/java&lt;/outputDirectory&gt;
          &lt;processor&gt;com.mysema.query.apt.jpa.JPAAnnotationProcessor&lt;/processor&gt;
        &lt;/configuration&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I got this error when building with Eclipse. I think it has relation with classpath and JDK jars</p>
  
  <pre><code>You need to run build with JDK or have tools.jar on the classpath.
  If this occures during eclipse build make sure you run eclipse under  JDK as well 
  (com.mysema.maven:apt-maven-plugin:1.0.6:process:default:generate-sources)
  </code></pre>
  
  <p><strong>.classpath</strong> :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="src" output="target/classes" path="src"&gt;
          &lt;attributes&gt;
              &lt;attribute name="optional" value="true"/&gt;
              &lt;attribute name="maven.pomderived" value="true"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0"&gt;
          &lt;attributes&gt;
              &lt;attribute name="owner.project.facets" value="jst.web"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"&gt;
          &lt;attributes&gt;
              &lt;attribute name="maven.pomderived" value="true"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"&gt;
          &lt;attributes&gt;
              &lt;attribute name="maven.pomderived" value="true"/&gt;
              &lt;attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/&gt;
          &lt;/attributes&gt;
      &lt;/classpathentry&gt;
      &lt;classpathentry kind="output" path="target/classes"/&gt;
  &lt;/classpath&gt;
  </code></pre>
  
  <p><br>
  Extra info :  </p>
  
  <p><img src="https://i.stack.imgur.com/XJWur.png" alt="enter image description here"></p>
  
  <p>My maven Installation</p>
  
  <p><img src="https://i.stack.imgur.com/JeVDl.png" alt="enter image description here"></p>
  
  <p><strong>JAVA_HOME : C:\Program Files\Java\jdk1.7.0_45</strong><br>
  <strong>PATH : %JAVA_HOME%\bin;</strong></p>