Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » configure non executable file's path(Reading text files between bundles)
configure non executable file's path [message #560015] Mon, 20 September 2010 18:18 Go to next message
unnu  is currently offline unnu Friend
Messages: 2
Registered: September 2010
Junior Member
Hello, I'm new doing "bundling", converting JARs to OSGi bundles.
I use Declarative Services.
I've convert a JAR file to an OSGi bundle (A), and I've got another bundle (B) that depends on it.

The problem I get is that the first bundle (A) needs to be read from a non executable text file in the other bundle (B).
I have tried to achieve it by configuration (MANIFEST.MF). I mean, there's an option to specify in Binary Build and Source Build the files that are going to be added to the binary or source build. But I get the same error from the "A" bundle (file not found exception). So I don't know if there's another way to configure non executable file's path.

I'd appreciate all your ideas, because I cannot find a suitable answer.

Thank you Very Happy
Re: configure non executable file's path [message #560017 is a reply to message #560015] Mon, 20 September 2010 18:32 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
What do you mean by the first bundle (A) needs to be read from a non executable text file in the other bundle (B)? Is that some kind of script? How does it read the file in a non-OSGi environment?

The API on org.osgi.framework.Bundle such as Bundle.getEntry, Bundle.findEntries etc. can be used to locate resources in other bundles. But I am not sure that will help you if your non-executable file is not java code running as part of bundle B.

Tom.
Re: configure non executable file's path [message #560045 is a reply to message #560017] Mon, 20 September 2010 22:30 Go to previous message
unnu  is currently offline unnu Friend
Messages: 2
Registered: September 2010
Junior Member
Thank you Thomas for having answered my question

Sorry, I've been studying french for months and my English level...

The main idea is that bundleA is a library that generates and processes a state machine. So bundleB is a hardware controller that has a configuration file, a very simple text file, with a concrete state machine info. In that way, I can generate different hardware controllers using and changing this text file which will be loaded by bundleA.

But I don't know if I would have to convert all the code of the JAR. And made all changes by hand and avoid that "file loading" in that way. Maybe using factory components... don't know.
Previous Topic:setting osgi.user.area with a prefix
Next Topic:Jsvc and Equinox
Goto Forum:
  


Current Time: Thu Apr 25 14:58:46 GMT 2024

Powered by FUDForum. Page generated in 0.02922 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top