Skip to main content

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

Sounds like bug 371565 [1]. Can you check if 0.15.0-SNAPSHOT works better?

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=371565

--
Regards,
Igor

On 12-04-25 2:47 PM, Eric Gwin wrote:
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

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top