I am working on an OSGi package that implements a service as a wrapper around its own executable. That is, the service launches the executable using ProcessBuilder, transfers it to some data, and retrieves the result. My question is the best way to pack this package. The native executable file includes a number of dependent data files that all must be present on the disk to run the tool. I found many links to working with native DLL files in OSGi, but none of them are related to files associated with a package that must be present on disk, and not just extracted through the class path.
I thought that I can include exectuable and dependent files directly in the package archive, and then programmatically extract it to some directory when the start is running. Another option I can think of is to put the executable somewhere and set a system property that points to it or something like that, but I want to keep the minimum configuration.
A solution that is not specific to a specific OSGi implementation would be nice, but if not, I use Equinox.
Thanks!
source
share