Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] question about importing JDK packages

com.sun.* packages are not part of any OSGi execution environment, so you will neither be able to resolve these imports at build time, nor load the classes at runtime (in an OSGi-standard compliant runtime; to make Equinox OSGi-compliant, set osgi.compatibility.bootdelegation=false)

 

There are various workarounds/hacks that you can try to use these classes in an OSGi runtime, e.g. a system bundle fragment or a custom profile, but the best solution is to not use these classes directly but rather via the API that they are supposed to be used.

 

Regards

Tobias

 

 

From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Justin Georgeson
Sent: Mittwoch, 20. März 2013 18:00
To: Tycho user list
Subject: [tycho-user] question about importing JDK packages

 

Looking at the execution environment stuff I feel like I have something in my build environment that I should be able to get rid of. We started our OSGi environment in PDE, and to satisfy imports on JDK packages we wrote a couple of bnd files to make bundle jars out of a few of the jar files in the jre/lib from our JDK, and then we put those jar files in our thirdparty P2 repo. This seems like a hack that we shouldn’t have to undertake and I’d like to get rid of it. But if I remove them from our thirdparty P2 repo then the maven validation goal fails to resolve these imports. I have the executionEnvironmentDefault set globally in the tycho-platform-configuration _and_ I have the Bundle-RequiredExecutionEnvironment in our plugin manifest.mf files. My POM file has this

 

                <repository>

                    <id>eclipse.platform</id>

                    <layout>p2</layout>

                    <url>http://download.eclipse.org/eclipse/updates/4.2-M-builds</url>

                </repository>

                <repository>

                    <id>eclipse.e4.tools</id>

                    <layout>p2</layout>

                    <url>http://download.eclipse.org/e4/updates</url>

                </repository>

 

When I build without the bnd modified JRE libs, it fails with this

 

org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from com.lgc.dsp-core 10.0.0.qualifier to package com.sun.management 0.0.0.", "Unable to satisfy dependency from com.lgc.mosaic 10.0.0.qualifier to package com.sun.java.swing.plaf.windows 0.0.0.", "Unable to satisfy dependency from com.lgc.owsw 10.0.0.qualifier to package com.sun.javadoc 0.0.0.", "Unable to satisfy dependency from com.lgc.owsw 10.0.0.qualifier to package com.sun.tools.javadoc 0.0.0.", "Unable to satisfy dependency from com.lgc.studio 10.0.0.qualifier to package com.sun.image.codec.jpeg 0.0.0.", "Unable to satisfy dependency from com.lgc.swingtools 10.0.0.qualifier to package com.sun.java.swing.plaf.motif 0.0.0.", "Unable to satisfy dependency from com.lgc.swingtools 10.0.0.qualifier to package com.sun.java.swing.plaf.windows 0.0.0.", "Unable to satisfy dependency from com.lgc.swingtools 10.0.0.qualifier to package com.sun.management 0.0.0.", "Unable to satisfy dependency from com.lgc.vizframework 10.0.0.qualifier to package com.sun.management 0.0.0.", "No solution found because the problem is unsatisfiable."]

 

 


This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.


Back to the top