Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Compilation Errors after bug 364076 on 0.14.0-SNAPSHOT

Technically, com.sun.* packages are not part of Java 6 and at least in
theory, may not be present on some platforms. So the "correct" way to
make your projects build, is to Import-Package all used com.sun.*,
sun.*, etc packages in your bundle manifest (I just did a quick test,
and this appears to work as expected with the current 0.14.0-SNAPSHOT).
Another approach is tell Tycho to ignore declared bundle execution
environment(s) during the build. This is not currently possible, but
feel free to open an enhancement request.

As for framework extensions, this is expected to work, so please open a
bugreport and provide an example project we can use to reproduce the
problem.


--
Regards,
Igor

On 11-12-21 2:17 PM, Matthew Roy wrote:
I recently updated to the latest 0.14.0-SNAPSHOT, after successfully using a
snapshot of 0.14.0 from earlier in November. The issue I'm having stems from
the changes introduced to fix bug 364076.  The issue I am seeing is that
some of my bundles have to reference classes within the underlying jdk
com.sun.* and sun.* packages.  All these bundles define their execution
environment as the 1.6se profile, so these bundles work within eclipse and
equinox  because that profile defines the org.osgi.framework.bootdelegation
property to include com.sun.* and sun.* . This means the compiler and the
execution runtime defers to the root classloader for those packages and
things work.

When I updated to the latest 0.14.0-SNAPSHOT, I get compilation errors
wherever I use these classes (com.sun.*,sun.*), since those packages aren't
in the Execution Environment's system packages.  I tried to solve this by
creating an Extension Bundle (Fragment-Host: system.bundle;
extension:=framework), exporting the packages I needed, but it doesn't seem
that tycho takes into account these Extension Bundles during compilation.

Is it possible to extend the system packages that the compiler within Tycho
uses on a per bundle basis using a compilation configuration parameter, or
do I need to do something special to get Tycho to take into account the
Extension Bundles?

Thanks.
Matt

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


Back to the top