OSGi與瀏覽器詳細配置步驟
1.File → new → project
2.選擇 Plug-in project
3.打入project name:com.puf.osgi.test
Target Platform選擇 an OSGi framework:Equinox
按下Next後選擇Finish
4.至MANIFEST 內點選 Dependencies
並至Required Plug-ins內選擇相依的Bundle
5.至com.puf.osgi.test下新增web-files資料夾,並在資料夾下新增一個index.html檔
6.在com.puf.osgi.test下新增一個plugin.xml檔案,檔案內容為
<plugin> <extension point="org.eclipse.equinox.http.registry.resources"> <resource alias="/web" base-name="/web_files" /> </extension> </plugin>
Manifest-Version: 1.0Bundle-ManifestVersion: 2Bundle-Name: TestBundle-SymbolicName: com.puf.osgi.test;singleton:=trueBundle-Version: 1.0.0.qualifierBundle-Activator: com.puf.osgi.test.ActivatorBundle-Vendor: PUFBundle-RequiredExecutionEnvironment: JavaSE-1.7Import-Package: org.osgi.framework;version="1.3.0"Require-Bundle: org.eclipse.equinox.http.jetty;bundle-version="2.0.100", org.eclipse.equinox.http.servlet;bundle-version="1.1.200", org.mortbay.jetty.server;bundle-version="6.1.23", org.apache.commons.logging;bundle-version="1.0.4", javax.servlet;bundle-version="2.5.0", org.eclipse.equinox.http.registry;bundle-version="1.1.100"