Bug 563930 - Adapt the codebase for no systemPackages in EE definitions
Summary: Adapt the codebase for no systemPackages in EE definitions
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2020-06-04 09:15 EDT by Alexander Kurtakov CLA
Modified: 2021-04-28 16:53 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kurtakov CLA 2020-06-04 09:15:33 EDT
Modular JVMs allow JVM distributions to not ship all systempackages that given Java version has as standard API. Thus EE definitions should no longer contain them.
Comment 1 Alexander Kurtakov CLA 2020-06-04 09:24:17 EDT
Todor, IIRC you mentioned smth about changes to EE definitions with regards to this bug. Could you please share some more info and/or links?
Comment 2 Alexander Kurtakov CLA 2020-06-04 09:28:02 EDT
https://docs.osgi.org/specification/osgi.core/7.0.0/framework.module.html contains some data that starting with Java 9 EE definitions having system.packages is meaningless.
Comment 3 Eclipse Genie CLA 2020-06-04 09:52:15 EDT
New Gerrit change created: https://git.eclipse.org/r/164177
Comment 4 Todor Boev CLA 2020-06-08 05:26:28 EDT
(In reply to Alexander Kurtakov from comment #1)
> Todor, IIRC you mentioned smth about changes to EE definitions with regards
> to this bug. Could you please share some more info and/or links?

As of OSGi R7 and under Java 9+, the system packages are optional. If you set them the OSGi runtime will have to honor them regardless of the actual set of packages available in the JRE.

It is recommended to let the OSGi runtime use reflection on the JPMS  modules to discover the system packages by itself.

Also as of Java 9+, the requirement:
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9))"

means merely that you want the JRE to support bytecode level 9, not that you require any particular set of system packages.

Finally note that under Java 9 the java modules are sill all seen as one system class loader and the bundles are loaded as the always have been. I.e. the "module path" of the JRE is not merged with the class loader model of OSGi.

For that you have to wait for OSGi R8...
Comment 5 Eclipse Genie CLA 2020-06-16 09:53:06 EDT
New Gerrit change created: https://git.eclipse.org/r/164998
Comment 6 Eclipse Genie CLA 2020-06-16 15:45:42 EDT
New Gerrit change created: https://git.eclipse.org/r/165019