Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OSGI working example

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3134
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3134
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3134
50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you're using an old JRE version. Recompile the sources with the JDK/JRE with which you intend to run them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic