Search code examples
javaosgikaraf

Can I modify a file inside osgi bundle?


Is it possible to modify a file inside OSGi bundle (the bundle is deployed to apache karaf) ? In other words, I want to marshall a java object into xml file in a deployed bundle. Is this possible?? Thanks


Solution

  • No. The JAR file format is immutable, if you want to modify a file inside it then you need to create a new JAR.

    Since this is OSGi you can then update the bundle.