Negative requirement to reject a wiring? How to force a particular Java version? #492
-
I'm working on a plugin that use javac internal API. This API is not really an API, so it changes on every Java version. Is there a way to tell Equinox "I don't want to wire against any module which provides this capability? Something like Or maybe it's something to reconsider more deeply in Equinox: maybe Java 22 should not provide osgi,ee 21 capability and should only provide the osgi.ee 22 one, and a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 17 replies
-
osgi.ee / bree are more a way to express the used class version not says anything about the java packages version so I think this is correct. If you need specific java features, you should therefore import the java packages you use. For this particular very special case you can use a Multi-Release jar and just add a dummy implementation that throws an exception for any java version higher than the supported one, that way you can even support multiple java versions in the same bundle: |
Beta Was this translation helpful? Give feedback.
Actually testing the runtime behavior I see this failure: