We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byOlivia Carroll
Modified over 2 years ago
aQute Eclipse Environment By Peter Kriens CEO aQute OSGi Director of Technology and OSGi Fellow
© aQute, All Rights Reserved slide #2 Contents What you will learn Eclipse Overview OSGi in Eclipse Creating a bundle Running a bundle Debugging a bundle Publishing a bundle Recap
© aQute, All Rights Reserved slide #3 What you will learn What Eclipse is all about Why Eclipse is important in relation to the OSGi Alliance How to run, debug, and publish a simple hello world bundle
© aQute, All Rights Reserved slide #4 Eclipse Overview Eclipse is an open source project that is developing a highly advanced Integrated Development Environment Though open source, it is driven foremost by IBM It is written in Java, but can be used for Java and other developments IBMs rich client architecture is based on Eclipse –Lotus clients!
© aQute, All Rights Reserved slide #5 Eclipse Goals Extremely open architecture that allows components from different origins to provide contributions –Menus, Views, Editors, etc. Decoupled so parts can be upgraded or replaced dynamically without disturbing other parts Providing an integration environment for UI based applications Today also looking at embedded applications
© aQute, All Rights Reserved slide #6 Eclipse and OSGi Eclipse developed a plugin model for release 1 and 2 The Equinox project developed a prototype that was based on the OSGi specifications The project was successful so the OSGi runtime replaced the Eclipse 1+2 runtime Eclipse R3 is a full blown OSGi environment
© aQute, All Rights Reserved slide #7 Setting up Eclipse to make bundles Install Eclipse from the CD or network. –Network: \\Ziggy\Course In not installed, install the Java SDK –Installers can be found in the download directory If not installed, install Eclipse Start Eclipse Starts up with a purple screen if for the first time.
© aQute, All Rights Reserved slide #8 Starting Eclipse
© aQute, All Rights Reserved slide #9 Setting up Eclipse Bravo! You are now running OSGi on your desktop! Click in the right hand corner to start Eclipse We now have to get a Framework running Copy the workspace directory to a directory on your hard disk, e.g. c:\workspace Create new project (File:Project) Then Next
© aQute, All Rights Reserved slide #10 Setting up a Framework Name the project Framework Select Create project at external location Select the Framework project in the workspace Click Finish This project can be run as an application (and debugged) It also provides the necessary libraries for our exercises
© aQute, All Rights Reserved slide #11 Creating a bundle A bundle is an OSGi executable It is a JAR file with classes and manifest The Bundle-Activator Manifest header points to the class that should be started This class must implement the BundleActivator interface
© aQute, All Rights Reserved slide #12 Back to Basics: Hello World Activator The Activator class will print Hello World when the bundle is started and Goodbye World when it stops. > BundleActivator
© aQute, All Rights Reserved slide #13 Getting Started Create new Java Project –File:New:Project –Java Project, Next
© aQute, All Rights Reserved slide #14 Create New Project –Project Name is hello world –Next
© aQute, All Rights Reserved slide #15 Create New Project Click Projects
© aQute, All Rights Reserved slide #16 Create New Project Select Framework –This will give us access to the OSGi specification class files and source code Click Libraries
© aQute, All Rights Reserved slide #17 Create New Project We need to add osgi.jar and servlet.jar from the Framework directory Click Add JARs Select Framework Select osgi.jar and servlet.jar Click OK Click Finish
© aQute, All Rights Reserved slide #18 Create Package Add Package –File:New:Package –Name, aQute.workshop.hello –Finish
© aQute, All Rights Reserved slide #19 Create Bundle Activator class File:New:Class –Package, aQute.workshop.hello –Name, Activator –Interfaces Add BundleActivator Finish Eclipse will open a generated source file
© aQute, All Rights Reserved slide #20 Activator class setup
© aQute, All Rights Reserved slide # Write Hello/Goodbye World Fill in the System.out.println(...) in the appropriate places Save the file (File:Save or control-S) –This automatically compiles, so correct any errors
© aQute, All Rights Reserved slide #22 Eclipse Tips and Tricks Renaming a class is in the Content menu, on Refactor –Handles all dependencies Control-N gives a list of completions Control-Shift-O cleans up your import clauses and find missing ones
© aQute, All Rights Reserved slide #23 Create The Manifest We only have to define what class to start: HelloWorld File:New:File, name it Manifest.mf –Store in root of the project
© aQute, All Rights Reserved slide #24 Create the Manifest Only fill in the Class field. This is the Bundle Activator Click on the Manifest.mf button at the bottom
© aQute, All Rights Reserved slide #25 Create the Manifest Add Manifest- Version: 1.0 at the top Then Bundle- Activator And 2 empty lines!!!
© aQute, All Rights Reserved slide #26 Create the Bundle JAR file Select the Hello World project in the left pane Press right mouse button (This is the context menu) Select Export Select JAR File Next
© aQute, All Rights Reserved slide #27 Create JAR File Export Destination –JAR file: Framework/load/HelloWorld.jar This screen defines the source and destination files Next
© aQute, All Rights Reserved slide #28 Create JAR file Save the description file in /hello world/bundle.jardesc The description can be reused many times Next
© aQute, All Rights Reserved slide #29 Create the JAR file Use existing manifest from workspace Finish
© aQute, All Rights Reserved slide #30 Starting A Framework The Framework project contains the OSGi Alliance Reference implementation –This Framework is not optimized, nor industrialized –It expires in 60 days –Contact a vendor for a real framework To start it –Select Framework project –Select aQute.crippled.jar (this contains a framework with some utitility bundles) –In context menu, select Run:Java Application
© aQute, All Rights Reserved slide #31 Select Main and then OK –This will start the frame It will start all bundles in the load directory –This is not standard but implemented in an aQute application bundle
© aQute, All Rights Reserved slide #32 Starting the Framework
© aQute, All Rights Reserved slide #33 Monitor When the Framework is started an OSGi monitor is also started This monitor shows some key information from the Framework It also watches the load folder and installs any new JAR files from this folder
© aQute, All Rights Reserved slide #34 Monitor A list of installed bundles, active or not active Detailed information about the bundle Exported packages Imported Packages Registered Services Used Services Operations Status
© aQute, All Rights Reserved slide #35 Monitor The monitor uses the OSGi event model to update the display in real time Check this by removing the hello world bundle from the load directory The monitor will show the uninstallation of the bundle
© aQute, All Rights Reserved slide #36 Restarting You can restart the bundle by –In the Hello World project –select the bundle.jardesc –Right mouse: Create Jar This works because the fileinstall bundle on the Framework will detect that the JAR file is modified in the load directory This will automatically update the bundle in the Framework (look at the console)
© aQute, All Rights Reserved slide #37 Updating the bundle
© aQute, All Rights Reserved slide #38 Debugging a Bundle Bundles can be easily debugged Instead of Run the framework, the framework must be started in the debugger First create a breakpoint in the HelloWorld start method (click in the left margin)
© aQute, All Rights Reserved slide #39 Select the Framework project and call up the context menu Select Debug:Java Application Select Main Click OK
© aQute, All Rights Reserved slide #40 Eclipse does not have the sources, so you must help it! So click on Edit Source Lookup Path.
© aQute, All Rights Reserved slide #41 Add the sources Click on Add Click on Java Project Select hello world Click Ok, Ok,Ok This information can also be set in Run:Debug:source
© aQute, All Rights Reserved slide #42 Debug Hello World The debugger is started You can now edit the source (within reason) and continue the session. E.g. change the text from Hello World to Bonjour and continue The red circled area contains the buttons to single step or continue
© aQute, All Rights Reserved slide #43 What Did We Learn? We learned how to create a real bundle This bundle needed –An Activator class –A Manifest These components were packed in a JAR file This JAR file was installed and started on an OSGi Framework with the fileinstaller bundle The console was used to see the effect of the start and stop methods We debugged the bundle
© aQute, All Rights Reserved slide #44 aQute ,
aQute Bundle Programming By Peter Kriens CEO aQute OSGi Director of Technology & OSGi Fellow.
OSGi World Congress Workshop Exercise By Peter Kriens CEO aQute OSGi Technology Officer.
AQute OSGi Bootcamp Workshop Exercise By Peter Kriens CEO aQute OSGi Technology Officer and OSGi Fellow.
OSGi Component Programming By Peter Kriens, OSGi Evangelist.
© copyright 2005 by aQute SARL All rights reserved. OSGi Basic Architecture OSGi User Group France By Peter Kriens Technical Director OSGi.
AQute R4 MEG By Peter Kriens CEO aQute OSGi Technology Officer and OSGi Fellow.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
© 2005 Altera Corporation © 2006 Altera Corporation Simulation with Mentor Graphics ModelSim.
WINDOWS XP BACKNEXTEND 1-1 Microsoft®. WINDOWS XP BACKNEXTEND 1-2 Operating System Operating systems software –The operating system is a special type.
State of Connecticut Core-CT Project Query 8 hrs Updated 4/14/2003.
AQute Inside OSGi By Peter Kriens CEO aQute OSGi Technology Officer and OSGi Fellow.
Renesas Technology America Inc. 1 SKP8CMINI-15,17 Tutorial 2 Creating A New Project Using HEW4.
Slide 1 FastFacts Feature Presentation June 19 th, 2008 We are using audio during this session, so please dial in to our conference line… Phone number:
Key Applications Module Lesson 11 Using Microsoft Office 2003 Computer Literacy BASICS.
StopPreviousNext Vicnet Internet training course Workbook 9 YouTube on the Internet Easy English workbook July 2010.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
1 MyScouting Tools. 2 To access the new MyScouting Tools, you will need to click on the link embedded in the MyScouting Flash page. As stated in the MyScouting.
New Mexico Broadband Program Introduction to the Internet Module 1 Understanding the Internet Key Features of Websites Navigating within a website.
1 BRState Software Demonstration. 2 After you click on the LDEQ link to download the BRState Software you will get this message.
1 Introduction to ASP.NET. 2 Static and Dynamic Web Applications HTML is used to create static content Browser software interprets HTML tags and formats.
Chapter 10, Slide 1Starting Out with Visual Basic 3 rd Edition Chapter 11 Developing Web Applications.
Call Management System (CMS) Training Washington State Course Code: PRESENTED BY Cindy Lindholm CTS -CMS Instructor 1. UPDATED 1/ 2013.
PrevNext | Slide 1 Michigan Electronic Grants System MEGS https://megs.mde.state.mi.us/megs/ MEGS Application Last Updated: 2/4/2011.
Proposal Budgets Module 7 1. Objectives 2 In this module you will learn: Basic Budget Concepts How to use Cayuse424 to create a: Detailed Budget Modular.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Lesson 12 Getting Started with Word Essentials 1 Morrison / Wells.
1 GREY BOX TESTING Web Apps & Networking Session 4 Boris Grinberg
Architectural Design IS301 – Software Engineering Lecture # 14 – M. E. Kabay, PhD, CISSP Dept of Computer Information Systems Norwich University.
2 Welcome To Defect Management Training Objective: The objective of this course is to learn about standards that emphasize a best practice approach for.
© 2017 SlidePlayer.com Inc. All rights reserved.