<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    [轉載]Eclipse插件及RCP開發中的第三方庫的設置

    很多人在開發RCP時,發現開發時都沒問題,但導出成包時卻報找不到第三方庫中類的錯誤。主要原因就是沒有將第三方庫配置好。現在我給出一個實現項目的配置為示例,以供參考。 原文出處:http://www.eclipseworld.org/bbs/read.php?tid=1133   環境:Eclipse3.2M3 一個RCP的實際項目 

    一、最關鍵的就是plugin.xml和MANIFEST.MF   
    所有界面上的最后操作,結果都是保存在這兩個文件中。注意:“.classpath”文件只是開發時對引用第三庫有用,打包發行之后它的作用就沒有了,還得靠plugin.xml和MANIFEST.MF。
    1、plugin.xml文件
    <?xml version="1.0" encoding="GB2312"?>
    <?eclipse version="3.0"?>
    <plugin>
    ?? <extension
    ???????? id="AdminConsole"
    ???????? point="org.eclipse.core.runtime.applications">
    ??????? <application>
    ??????????? <run class="com.wxxr.management.admin.console.AdminConsole"/>
    ??????? </application>
    ?? </extension>
    ?
    ?? <extension id="AdminConsole" point="org.eclipse.core.runtime.products">
    ? <product name="%productName" application="com.wxxr.management.admin.console.AdminConsole">
    ?? <property name="appName" value="%swtAppName"/>
    ?? <property name="windowImages" value="icons/eclipse.gif,icons/eclipse32.gif"/>
    ?? <property name="aboutText" value="%aboutText"/>
    ?? <property name="aboutImage" value="icons/eclipse_lg.gif"/>
    ?? <property name="windowImages" value="icons/alt16.gif,icons/eclipse.gif"/>
    ? </product>
    ?? </extension>
    ??
    ?? <extension
    ????? point="org.eclipse.ui.perspectives">
    ????? <perspective
    ??????????? class="com.wxxr.management.admin.console.monitor.MonitorPerspective"
    ??????????? name="%perspectiveName"
    ??????????? id="com.wxxr.management.admin.console.monitor.MonitorPerspective"/>
    ????? <perspective
    ??????????? class="com.wxxr.management.admin.console.configure.ConfigurePerspective"
    ??????????? name="%configurePerspectiveName"
    ??????????? id="com.wxxr.management.admin.console.configure.ConfigurePerspective"/>
    ????? <perspective
    ??????????? class="com.wxxr.management.admin.console.jmx.JMXPerspective"
    ??????????? name="%jmxPerspectiveName"
    ??????????? id="com.wxxr.management.admin.console.jmx.JMXPerspective"/>
    ?? </extension>
    ?<extension
    ?? point="org.eclipse.ui.editors">
    ?? <editor
    ?? name="事件列表"
    ?? icon="icons/alt16.gif"
    ?? class="com.wxxr.management.admin.console.log.ui.LogEditor"
    ?? id="com.wxxr.management.admin.console.log.ui.LogEditor">
    ?? </editor>
    ?? <editor
    ?? name="地圖"
    ?? icon="icons/map_view.gif"
    ?? class="com.wxxr.management.admin.console.map.MapEditor"
    ?? id="com.wxxr.management.admin.console.map.MapEditor">
    ?? </editor>
    ?</extension>
    ?? <extension
    ???????? point="org.eclipse.ui.views">
    ????? <category
    ??????????? id="com.wxxr.management.admin.console.monitor.view"
    ??????????? name="%views.category.name"/>
    ????? <view
    ??????????? id="com.wxxr.management.admin.console.navigator.ui.StationExploreView"
    ??????????? name="工作站"
    ??????????? icon="icons/eclipse.gif"
    ??????????? class="com.wxxr.management.admin.console.navigator.ui.StationExploreView"
    ??????????? category="com.wxxr.management.admin.console.monitor.view"/>
    ????? <view
    ??????????? name="事件細節"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.monitor.view"
    ??????????? class="com.wxxr.management.admin.console.monitor.eventview.EventDetailView"
    ??????????? id="com.wxxr.management.admin.console.monitor.eventview.EventDetailView" />
    ????? <view
    ??????????? name="事件統計"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.monitor.view"
    ??????????? class="com.wxxr.management.admin.console.monitor.view.SystemEventStatisticsView"
    ??????????? id="com.wxxr.management.admin.console.monitor.view.SystemEventStatisticsView" />
    ????? <view
    ??????????? name="緊急事件處理"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.monitor.view"
    ??????????? class="com.wxxr.management.admin.console.emergency.ui.EmergencyEventReceiverView"
    ??????????? id="com.wxxr.management.admin.console.emergency.ui.EmergencyEventReceiverView" />
    ????? <category
    ??????????? id="com.wxxr.management.admin.console.jmx.view"
    ??????????? name="%views.category.name"/>
    ????? <view
    ??????????? name="JMX Connections"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.jmx.view"
    ??????????? class="com.wxxr.management.admin.console.jmx.ui.JMXExploreView"
    ??????????? id="com.wxxr.management.admin.console.jmx.ui.JMXExploreView" />
    ????? <view
    ??????????? name="JMX Attributes View"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.jmx.view"
    ??????????? class="com.wxxr.management.admin.console.jmx.ui.AttributesView"
    ??????????? id="com.wxxr.management.admin.console.jmx.ui.AttributesView" />
    ????? <view
    ??????????? name="JMX Operations View"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.jmx.view"
    ??????????? class="com.wxxr.management.admin.console.jmx.ui.OperationsView"
    ??????????? id="com.wxxr.management.admin.console.jmx.ui.OperationsView" />
    ????? <view
    ??????????? name="JMX MBean View"
    ??????????? icon="icons/eclipse.gif"
    ??????????? category="com.wxxr.management.admin.console.jmx.view"
    ??????????? class="com.wxxr.management.admin.console.jmx.ui.MBeanView"
    ??????????? id="com.wxxr.management.admin.console.jmx.ui.MBeanView" />
    ?? </extension>
    ?? <extension
    ???????? id="AdminConsole"
    ???????? point="org.eclipse.core.runtime.products">
    ????? <product
    ??????????? application="com.wxxr.management.admin.console.AdminConsole"
    ??????????? name="AdminConsole"/>
    ?? </extension>
    ??
    </plugin>
    ? 2、META-INF\MANIFEST.MF文件
    ??? 注意:(1)這里require-bundle定義了項目依賴的插件。
    (2)Bundle-ClassPath定義了引用的第三方庫,別忘了把AdminConolse項目自己console.jar加進去,否則連自己項目里的類都會找不到。
    Manifest-Version: 1.0
    Bundle-ManifestVersion: 2
    Bundle-Name: %pluginName
    Bundle-SymbolicName: com.wxxr.management.admin.console; singleton:=true
    Bundle-Version: 1.0.0
    Bundle-Activator: com.wxxr.management.admin.console.AdminConsolePlugin
    Bundle-Localization: plugin
    Require-Bundle: org.eclipse.ui,
    ?org.eclipse.core.runtime,
    ?org.eclipse.core.resources,
    ?org.eclipse.gef,
    ?org.eclipse.ui.forms,
    ?org.eclipse.ui.console
    Eclipse-AutoStart: true
    Bundle-Vendor: %providerName
    Bundle-ClassPath: console.jar,
    ?lib/commons-codec-1.3.jar,
    ?lib/jboss.jar,
    ?lib/jbossall-client.jar,
    ?lib/jboss-jmx.jar,
    ?lib/jboss-system.jar,
    ?lib/log4j-1.2.8.jar,
    ?lib/wxxr-common-1.0-b1.jar,
    ?lib/wxxr-common-jboss-1.0-b1.jar,
    ?lib/wxxr-db-persistence-1.0-b1.jar,
    ?lib/wxxr-jboss-controller-1.0-b1.jar,
    ?lib/wxxr-jboss-workstation-1.0-b1.jar,
    ?lib/wxxr-remoting-1.0-b1.jar,
    ?lib/wxxr-security-1.0-b1.jar,
    ?lib/xerces-2.6.2.jar,
    ?lib/xmlParserAPIs-2.2.1.jar,
    ?lib/xmlrpc-2.0.jar
    ?3、build.properties文件
    這個文件主要是用Eclipse導出包的時候用。
    source.console.jar = src/
    output.console.jar = bin/
    bin.includes = plugin.xml,\
    ?????????????? *.jar,\
    ?????????????? console.jar, \
    ?????????????? plugin.properties
    ??????????????
    pluginName = Admin Console Plug-in
    providerName = WXXR.com.cn
    perspectiveName = Admin Console
    configurePerspectiveName= Configure
    jmxPerspectiveName= JMX Console
    ??????????????
    jars.extra.classpath = lib/commons-codec-1.3.jar,\
    ?????????????????????? lib/jboss.jar,\
    ?????????????????????? lib/jbossall-client.jar,\
    ?????????????????????? lib/jboss-jmx.jar,\
    ?????????????????????? lib/jboss-system.jar,\
    ?????????????????????? lib/log4j-1.2.8.jar,\
    ?????????????????????? lib/wxxr-common-1.0-b1.jar,\
    ?????????????????????? lib/wxxr-common-jboss-1.0-b1.jar,\
    ?????????????????????? lib/wxxr-db-persistence-1.0-b1.jar,\
    ?????????????????????? lib/wxxr-jboss-controller-1.0-b1.jar,\
    ?????????????????????? lib/wxxr-jboss-workstation-1.0-b1.jar,\
    ?????????????????????? lib/wxxr-security-1.0-b1.jar,\
    ?????????????????????? lib/wxxr-remoting-1.0-b1.jar,\
    ?????????????????????? lib/xerces-2.6.2.jar,\
    ?????????????????????? lib/xmlParserAPIs-2.2.1.jar,\
    ?????????????????????? lib/xmlrpc-2.0.jar
    4、plugin.properties,這個放一些上面幾個文件用到的變量。
    pluginName= WXXR Admin Console
    providerName= wxxr.com.cn
    ?
    productName= WXXR SMS Operation Platform
    appName= WXXR Admin Console
    perspectives.browser.name= WXXR Admin Console
    views.category.name= WXXR Admin Console
    views.browser.name= Browser
    views.history.name= History
    views.stationexplore.name= Stations
    views.tasklist.name= Task List
    views.loglist.name= Workstation Monitor
    monitor.message.detail=Monitor Message Detail
    monitor.message.statistics=????
    ?
    swtAppName= AdminConsole
    aboutText= WXXR Admin Console \n\n\
    (c) Copyright WXXR Ltd. and others 2003, 2004.? All rights reserved.\n\
    Visit http://www.wxxr.com.cn
    ?二、圖形方式 有時直接編輯plugin.xml等文件容易出錯(全角空格什么的),那么可以用圖形編輯方式來,不過最后結果還是反映到plugin.xml等文件中的。我把plugin.xml打開,然后一個項一個項的把圖截下來,以供大家參考。

    posted on 2007-01-04 14:10 小牛小蝦 閱讀(705) 評論(1)  編輯  收藏

    評論

    # re: [轉載]Eclipse插件及RCP開發中的第三方庫的設置 2010-09-21 15:56 symons cone crusher

    你還挺有自知之明的嘛,沒有姚明高,沒有華仔帥,哈哈  回復  更多評論   


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2007年1月>
    31123456
    78910111213
    14151617181920
    21222324252627
    28293031123
    45678910

    導航

    統計

    常用鏈接

    留言簿(6)

    隨筆檔案

    文章檔案

    eclipse

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 13一14周岁毛片免费| a免费毛片在线播放| 亚洲黄色片免费看| 午夜亚洲国产理论秋霞| 在线观看人成视频免费无遮挡| 亚洲精品成人片在线观看| 日本一区二区在线免费观看| 亚洲成?v人片天堂网无码| 青青草国产免费国产是公开| 免费乱码中文字幕网站| 一本到卡二卡三卡免费高| 久久亚洲色一区二区三区| a级在线观看免费| 亚洲午夜未满十八勿入| 日本视频一区在线观看免费| 亚洲人成免费电影| 免费无码A片一区二三区| 亚洲av无码专区在线观看亚| 啦啦啦在线免费视频| 三级片免费观看久久| 国产AⅤ无码专区亚洲AV| 无码精品国产一区二区三区免费| 91天堂素人精品系列全集亚洲 | 亚洲日韩一页精品发布| 成人免费av一区二区三区| 亚洲电影在线播放| 成人在线视频免费| 老司机午夜在线视频免费| 亚洲精品夜夜夜妓女网 | 扒开双腿猛进入爽爽免费视频| 亚洲AV无码专区亚洲AV桃| 亚洲日韩国产成网在线观看| 一个人免费视频在线观看www| 亚洲最大中文字幕| 日韩一区二区在线免费观看| 国产乱妇高清无乱码免费| 久久精品国产亚洲AV忘忧草18| 国产免费av片在线无码免费看| 精品一区二区三区免费观看| 亚洲婷婷天堂在线综合| 亚洲无线一二三四区手机|