I have changed the BREE from JavaSE-1.6
to JavaSE-1.7
in the manifest files of my application:
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Now I can not compile the application again.
When I run mvn clean install
I get:
[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] -> [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
My toolchains.xml
contains:
<toolchain>
<type>jdk</type>
<provides>
<version>1.7</version>
<vendor>sun</vendor>
<id>JavaSE-1.7</id>
</provides>
<configuration>
<jdkHome>C:\Java\jdk1.7.0_45</jdkHome>
</configuration>
</toolchain>
When I run mvn -version
the Java version seems to be OK:
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"
I guess my JAVA_HOME is correct, but I am not sure. echo %JAVA_HOME%
prints C:\Java\jdk1.7.0_17\jre
. A related problem on the Tycho-Mailing list was solved by setting JAVA_HOME correctly, but my problem seems to be different.
I'm using Tycho in version 0.19.0. I have also tried a newer version, but this didn't change anything.