You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Eelco Meuter <Ee...@wur.nl> on 2010/03/04 11:28:47 UTC

newbie question custom launcher

Dear Felix users/developers,

After reading the elaborate example on the cwiki of launching and embedding felix using the frameworkFactory, I tried to make it work on my own machine. I created a similar project set up as given under the heading custom framework launcher. I use the main version 2.04 and two of my own bundles instead. The method getFrameworkFactory is simplified using a serviceloader. This is my code snipplet:
ServiceLoader<FrameworkFactory> loader = ServiceLoader
				.load(FrameworkFactory.class);
FrameworkFactory frameworkFactory = loader.iterator().next();

I use Ant to create a executable jar with only one class (Main) and the felix main jar (located under lib) defined as class path in the manifest. The service loader throws a classnotfoundexception. The service file is located in the felix main jar, not in my jar. Is this the problem? If so, what is the path to the implementation in order to duplicate  the service file in the felix main jar? I hope somebody can help me with this, what seems a trivial, question? Thanks in advance!

Regards,

Eelco Meuter

Re: newbie question custom launcher

Posted by Eelco Meuter <ee...@wur.nl>.
Sorry,sorry, sorry
I saw my silly mistake. There was I typo in my build file.

Eelco


On 4 Mar 2010, at 11:28, Eelco Meuter wrote:

> Dear Felix users/developers,
> 
> After reading the elaborate example on the cwiki of launching and embedding felix using the frameworkFactory, I tried to make it work on my own machine. I created a similar project set up as given under the heading custom framework launcher. I use the main version 2.04 and two of my own bundles instead. The method getFrameworkFactory is simplified using a serviceloader. This is my code snipplet:
> ServiceLoader<FrameworkFactory> loader = ServiceLoader
> 				.load(FrameworkFactory.class);
> FrameworkFactory frameworkFactory = loader.iterator().next();
> 
> I use Ant to create a executable jar with only one class (Main) and the felix main jar (located under lib) defined as class path in the manifest. The service loader throws a classnotfoundexception. The service file is located in the felix main jar, not in my jar. Is this the problem? If so, what is the path to the implementation in order to duplicate  the service file in the felix main jar? I hope somebody can help me with this, what seems a trivial, question? Thanks in advance!
> 
> Regards,
> 
> Eelco Meuter



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org