Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java 9 and OSGi

 
Greenhorn
Posts: 1
Netbeans IDE Oracle PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings, just starting to learn about the Java 9 modularity.  
I wonder how is the Java module system compatible with the OSGi platform? Which one is better for a certain case?

Thanks for your time.

 
Marshal
Posts: 70261
282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see you are new: welcome to the Ranch
 
Author
Posts: 17
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Camilo,

Several points about OSGi and Java 9:

- OSGi itself runs fine on top of the Java 9 classpath
- The Java module system has no inherent compatibility story with OSGi
- The OSGi alliance has been exploring interop between OSGi and Java modules, but there's no official story on that yet

In short, both worlds are currently quite separated. As to when you'd use OSGi vs. the Java module system, that really depends on your requirements. OSGi has many features support dynamic systems (e.g. modules/services can come and go at run-time). If that's what you need, stick with OSGi. If you need a more down-to-earth module system (with proper toolsupport, since its officially part of the platform and language), then checking out the Java module system is a good idea.
    Bookmark Topic Watch Topic
  • New Topic