title: Tycho: Bundle X - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
body: <p>I have changed the BREE from <code>JavaSE-1.6</code> to <code>JavaSE-1.7</code> in the manifest files of my application:</p>
  
  <pre><code>Bundle-RequiredExecutionEnvironment: JavaSE-1.7
  </code></pre>
  
  <p>Now I can not compile the application again.</p>
  
  <p>When I run <code>mvn clean install</code> I get:</p>
  
  <pre><code>[INFO] Resolving dependencies of MavenProject: Xgroup:X:4.0.100-SNAPSHOT @ C:\Users\....\X\pom.xml
  [WARNING] The following locally built units have been used to resolve project dependencies:
  [WARNING]   Za
  [WARNING]   Zb
  [INFO] Resolving class path of MavenProject: Xgroup:X:4.0.100-SNAPSHOT @ C:\Users\....\X\pom.xml
  [ERROR] Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle X cannot be resolved
  [ERROR] Resolution errors:
  [ERROR] Bundle X - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
  [ERROR] -&gt; [Help 1]
  org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle X cannot be resolved
  Resolution errors:
     Bundle X - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
  </code></pre>
  
  <p>My <code>toolchains.xml</code> contains:</p>
  
  <pre><code>  &lt;toolchain&gt;
       &lt;type&gt;jdk&lt;/type&gt;
       &lt;provides&gt;
           &lt;version&gt;1.7&lt;/version&gt;
           &lt;vendor&gt;sun&lt;/vendor&gt;
           &lt;id&gt;JavaSE-1.7&lt;/id&gt;
       &lt;/provides&gt;
       &lt;configuration&gt;
          &lt;jdkHome&gt;C:\Java\jdk1.7.0_45&lt;/jdkHome&gt;
       &lt;/configuration&gt;
    &lt;/toolchain&gt;
  </code></pre>
  
  <p>When I run <code>mvn -version</code> the Java version seems to be OK:</p>
  
  <pre><code>Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
  Maven home: C:\Tools\apache-maven-3.0.4\bin\..
  Java version: 1.7.0_17, vendor: Oracle Corporation
  Java home: C:\Java\jdk1.7.0_17\jre
  Default locale: en_US, platform encoding: Cp1252
  OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
  </code></pre>
  
  <p>I guess my JAVA_HOME is correct, but I am not sure. <code>echo %JAVA_HOME%</code> prints <code>C:\Java\jdk1.7.0_17\jre</code>. A <a href="https://dev.eclipse.org/mhonarc/lists/tycho-user/msg01964.html" rel="nofollow">related problem on the Tycho-Mailing list</a> was solved by setting JAVA_HOME correctly, but my problem seems to be different.</p>
  
  <p>I'm using Tycho in version 0.19.0. I have also tried a newer version, but this didn't change anything. </p>