Osgi series-use eclipse to view bundle source code

Source: Internet
Author: User

When using eclipse to develop osgi bundle, you will find that many existing bundle can be used. But how to use these bundle? In addition to searching for information on the Internet, reading the bundle source code is also a good method.

 

This document usesOrg. Eclipse. osgi. ServicesFor example, it describes how to use eclipse to read its source code.

 

Step 1: Open eclipse and selectRun> run commands...Open the run configuration dialog box and findOsgi framework, ClickNewButton, such. Find the corresponding version of osgi. Here is3.7.2, Write down, and then clickCloseButton, there is no need to save it here.

 

Step 2: Open your browser and go to the Equinox download URLHttp://download.eclipse.org/equinox/, Find the corresponding version:

Click to enter and selectAll of equinoxDownload type:

 

Step 3: Decompress the package and enterPlguinsDirectory, find the bundle source code file to read its source code, here you need to pay attention to the corresponding version issues. EclipseIs org. Eclipse. osgi. services_3.0.v20110513, InPluginsThe Directory should have two jar files:Org. Eclipse. osgi. services_3.0.v20110513.jarAndOrg. Eclipse. osgi. Services. source_3.0.v20110513.jarThe following file is the bundle source code file. Copy the corresponding source code file to the eclipse installation location for downloadPluginsDirectory.

 

Step 4: Create a bundle project in eclipseManifest. MFAdd filesOrg. Eclipse. osgi. ServicesImport:

 

Step 5: ImportOrg. Eclipse. osgi. ServicesAfterPlug-in DependenciesThe bundle will appear under the category. Expand the package below and double-click the class name to see the corresponding source code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.