aspose file tools*
The moose likes Other Application Frameworks and the fly likes OSGI working example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "OSGI working example" Watch "OSGI working example" New topic
Author

OSGI working example

Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Hi All,

I have started learning OSGI and I want working example for that(already tested )..

Anyone can help me ?

by the way I have tried several examples but I was unable to run them correctly.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What, exactly, have you tried, and how, exactly, did that not work?

Also, which implementation are you using? Apache Felix, for example, has numerous examples readily available online: http://felix.apache.org/site/apache-felix-osgi-tutorial.html and http://felix.apache.org/site/apache-felix-application-demonstration.html
Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Thanks Moores for your reply ,

I have tried this example http://www.javaworld.com/javaworld/jw-03-2008/jw-03-osgi1.html?page=2

and i have got this error

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
If you're a beginner with OSGI I wouldn't start by mucking around with as complex an application as Eclipse. Start with a simple example instead that doesn't have any other external dependencies. The Felix examples I pointed you to accomplish that nicely.
Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Thanks Moores for your reply,


I have did the following steps
1. create Activator.java file
2. generate the jar file "BundleExample1.jar"
3. start it using the command
start file:/home/test/Desktop/BundleExample1.jar

but am getting the following error






manifest.mf



Activator.java
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Looks like you're using an old JRE version. Recompile the sources with the JDK/JRE with which you intend to run them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OSGI working example
 
Similar Threads
Modular Java: ESB
Portability of Spring applications running in OSGi and outside of OSGi
OSGi and Spring, is it worth it?
Calling Osgi service from Servlet
OSGi Use Cases