title: Jenkins COMPILATION ERROR
body: <p>I'm building a multi-module maven project with jenkins, reported </p>
  
  <pre><code>[ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] Failure executing javac, but could not parse the error
  Fatal Error: Unable to find package java.lang in classpath or bootclasspath.
  </code></pre>
  
  <p>Java version</p>
  
  <pre><code>java version "1.7.0_79"
  Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
  Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
  </code></pre>
  
  <p>Maven  version</p>
  
  <pre><code>Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
  Maven home: /home/local/apache-maven-3.3.9
  Java version: 1.7.0_79, vendor: Oracle Corporation
  Java home: /home/local/jdk1.7.0_79/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "linux", version: "2.6.32-431.el6.x86_64", arch: "amd64", family: "unix"
  </code></pre>
  
  <p>Pom.xml</p>
  
  <pre><code>&lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;nexus&lt;/id&gt;
              &lt;name&gt;Team Nexus Repository&lt;/name&gt;
              &lt;url&gt;http://192.168.0.252:8081/nexus/content/groups/public&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;nexus&lt;/id&gt;
              &lt;name&gt;Team Nexus Repository&lt;/name&gt;
              &lt;url&gt;http://192.168.0.252:8081/nexus/content/groups/public&lt;/url&gt;
           &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
      &lt;distributionManagement&gt;
          &lt;repository&gt;
              &lt;id&gt;nexus-releases&lt;/id&gt;
              &lt;url&gt;http://192.168.0.252:8081/nexus/content/repositories/releases/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;nexus-snapshots&lt;/id&gt;
              &lt;url&gt;http://192.168.0.252:8081/nexus/content/repositories/snapshots/&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>Linux CLASSPATH</p>
  
  <pre><code>.:/home/local/jdk1.7.0_79/lib/dt.jar:/home/local/jdk1.7.0_79/lib/tools.jar
  </code></pre>
  
  <p>I think it is jdk configuration problems, but jdk environment variable should be correct.
  Jenkins Environment Variables:</p>
  
  <p><img src="https://i.stack.imgur.com/txjAO.png" alt=""></p>
  
  <p><img src="https://i.stack.imgur.com/36eq2.png" alt=""></p>
  
  <p>Any help would be appreciated.</p>