1 / 33

My First OSGi Bundle

My First OSGi Bundle. New Project (1). New Project (2). New Project (3). New Project (4). Activator.java file. MANIFEST.MF File. Run configure(1). Run configure(2). run. run. run. My First OSGi Service Bundle. New project(1). New project(2). New project(3). New project(4).

asher-mcgee
Download Presentation

My First OSGi Bundle

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. My First OSGi Bundle

  2. New Project (1)

  3. New Project (2)

  4. New Project (3)

  5. New Project (4)

  6. Activator.java file

  7. MANIFEST.MF File

  8. Run configure(1)

  9. Run configure(2)

  10. run

  11. run

  12. run

  13. My First OSGi Service Bundle

  14. New project(1)

  15. New project(2)

  16. New project(3)

  17. New project(4)

  18. New Interface

  19. New class

  20. OSGi Bundle with SWT

  21. Bundle with SWT • package testbundle; • import org.osgi.framework.BundleActivator; • import org.osgi.framework.BundleContext; • import org.eclipse.swt.widgets.Display; • import org.eclipse.swt.widgets.Shell; • public class Activator implements BundleActivator { • Display display = new Display(); • public void start(BundleContext context) throws Exception { • System.out.println("Hello World!!"); • Shell shell = new Shell(display); • shell.setText("Hello world!"); • shell.open(); • //while (!shell.isDisposed()) { • //if (!display.readAndDispatch()) display.sleep(); • //} • //display.dispose(); • } • public void stop(BundleContext context) throws Exception { • System.out.println("Goodbye World!!"); • display.dispose(); • } • }

  22. Dependency

  23. Make Bundle JAR file

  24. Modify MENIFEST>MF

  25. If no modify(Cause version error)

  26. export

  27. Make jar

  28. Select export

  29. Select class

  30. MANIFEST.MF

  31. Make OSCAR Bundle

  32. Use manifest.mf

  33. Use MANIFEST.MF

More Related