Skip to content

Conversation

@chrisrueger
Copy link
Contributor

Closes #6858

Experimental:

For a yet to bnd unknown JDK (e.g. JDK-10000) Instead of

Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"

we now create

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9955))"

for a .class file with u2 major_version 10000 (9955 == 10000 - 45)

@chrisrueger chrisrueger changed the title more lenient osgi.ee for unknown JDKs more lenient osgi.ee=JavaSE for unknown JDKs Oct 6, 2025
@chrisrueger chrisrueger force-pushed the 6858-improve-osgiee-for-unknown-jdk branch 2 times, most recently from 3f533d5 to c63fede Compare October 10, 2025 19:12
@chrisrueger chrisrueger marked this pull request as ready for review October 18, 2025 14:44
@chrisrueger chrisrueger force-pushed the 6858-improve-osgiee-for-unknown-jdk branch from c63fede to 8d418ec Compare October 19, 2025 19:27
@laeubi
Copy link
Contributor

laeubi commented Oct 27, 2025

In the advent of regular Java versions released this seems the right approach. In general the EE enum might needs to be revised by:

  1. deprecate it
  2. replace all usages by a new JavaExecutionEnvironment class that can hold a java version and computes what ever is needed from that.

@laeubi
Copy link
Contributor

laeubi commented Oct 27, 2025

@chrisrueger I have fired up a task for the AI here maybe it produces something useful as a base-ground:

@chrisrueger
Copy link
Contributor Author

In general the EE enum might needs to be revised by

Just adding that currently there are two enums holding Java versions:

  • aQute.bnd.osgi.Clazz.JAVA
  • aQute.bnd.build.model.EE

For a yet to bnd unknown JDK (e.g. JDK-10000) Instead of

```
Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"
```

we now create

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=9955))"

for a  .class file with u2 major_version 10000 (9955 == 10000 - 45)

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger force-pushed the 6858-improve-osgiee-for-unknown-jdk branch from 8d418ec to 93558d3 Compare November 2, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can the osgi.ee=JavaSE be more lenient on unknown JDK versions?

2 participants