Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Specifying the Target JVM and a possible bug..?

Hi,

We have a bundle that depends upon javax.xml.stream, compile against JDK 1.6, but are currently trying to maintain compatibility with JDK 1.5. I thought previous posts stated that the target JVM flag is set according to the manifest's Bundle-RequiredExecutionEnvironment parameter, but cannot find the reference.

At any rate, Using JDK 1.6, Maven 3.0.4, and Tycho 0.14.1, compiling the bundle in question using Bundle-RequiredExecutionEnvironment: J2SE-1.5, yields:

     ...
     [java] [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.14.1:compile (default-compile) on project org.eclipse.persistence.core: Compilation failure: Compilation failure:
     [java] [ERROR] D:\_EL_Trunk2\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\oxm\record\XMLEventWriterRecord.java:[22,0]
     [java] [ERROR] import javax.xml.stream.XMLEventFactory;
     [java] [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] [ERROR] Access restriction: The type XMLEventFactory is not accessible due to restriction on classpath entry C:\Program Files\Java\jdk1.6.0_26\jre\lib\rt.jar
     [java] [ERROR] D:\_EL_Trunk2\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\oxm\record\XMLEventWriterRecord.java:[23,0]
     [java] [ERROR] import javax.xml.stream.XMLEventWriter;
     [java] [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] [ERROR] Access restriction: The type XMLEventWriter is not accessible due to restriction on classpath entry C:\Program Files\Java\jdk1.6.0_26\jre\lib\rt.jar
     [java] [ERROR] D:\_EL_Trunk2\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\oxm\record\XMLEventWriterRecord.java:[24,0]
     [java] [ERROR] import javax.xml.stream.XMLStreamException;
     [java] [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] [ERROR] Access restriction: The type XMLStreamException is not accessible due to restriction on classpath entry C:\Program Files\Java\jdk1.6.0_26\jre\lib\rt.jar
     [java] [ERROR] D:\_EL_Trunk2\foundation\org.eclipse.persistence.core\src\org\eclipse\persistence\oxm\record\XMLEventWriterRecord.java:[25,0]
     [java] [ERROR] import javax.xml.stream.events.XMLEvent;
     [java] [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] [ERROR] Access restriction: The type XMLEvent is not accessible due to restriction on classpath entry C:\Program Files\Java\jdk1.6.0_26\jre\lib\rt.jar
     ...

The thing is, while these packages are in the 1.6 JVM, they aren't in the 1.5. However, we have a repository setting for Orbit, so Tycho should be able to resolve the packages from the javax.xml.stream bundle there. Instead to make the errors go away I've had to change the manifest setting to "JavaSE-1.6".

Is this a Tycho bug, or a configuration issue on my part? Does changing that setting mean the JVM target has changed to 1.6?

-Eric



Back to the top