I'm not quite a total newbie to OSGi, but apparently newbie enough.
What I want to do is write an OSGi (Apache Felix) bundle and use the Java scripting API (JSR-223) with for example Groovy. For this I installed groovy 2.4.12, which already is an OSGi bundle, and I see the Groovy Runtime (2.4.12) as an active service in Felix's Remote Shell Console.
I also understand the conflict between Java's ServiceLoader API and OSGi's bundles. This Is OSGi fundamentally incompatible with JSR-223 Scripting Language Discovery? refers to a blog stating that Felix has found a workaround already.
All good. But then. What do I need to import to use that OSGiScriptEngineManager sniplet?