Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Prefer currently running Java as ExecutionEnvironment version instead of BREE ?

I think that is okay, because compile-time != run-time, as mentioned before, the only thing we could do is to use the BREE packages of the bundle and try to resolve them against the target and emit a warning/error if the target does not supply all packages.

Even the OSGi-spec mentioned that a bundle that wan't to be sure to not run into a CNF-Exception because of missing java-packages has to list all java.* packages as imports (but its not mandatory to do so) because otherwise there is no guarantee that at run-time all bundles will be present.


Am 11.07.20 um 19:25 schrieb Mickael Istria:


On Sat, Jul 11, 2020 at 11:18 AM Christoph Läubrich <laeubi@xxxxxxxxxxxxxx <mailto:laeubi@xxxxxxxxxxxxxx>> wrote:

    To summarize: If a target specified a JRE (either directly or
    indirectly) and a matching toolchain is available that should be used,
    otherwise the build-jre.


This is the current state in Tycho 2.0.0-SNAPSHOT (or at least what's desired).

    But all this only loosley relates to BundleRequiredExecutionEnvironment.


The relationship is when a bundle uses useJDK=BREE: the JRE that will be used for compilation will come from toolchain definition and may not be the one that's used for dependency resolution against the execution environment (specified via .target file or otherwise); and -unless I'm mistaken- the compile classpath is derived from the EE and not from the actually used JDK, so it's probable that by resolving classpath against a different JRE than the one used for compilation, there may be missing packages.

_______________________________________________
tycho-dev mailing list
tycho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-dev



Back to the top