很久很久以前

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            34 隨筆 :: 4 文章 :: 17 評(píng)論 :: 0 Trackbacks
          獲得插件的絕對(duì)路徑:
          ????/**
          ?????*?得到插件的絕對(duì)路徑
          ?????*?
          ?????*?
          @return?路徑
          ?????
          */

          ????
          public?static?String?getPath()?{
          ????????String?path;
          ????????
          try?{
          ????????????path?
          =?FileLocator.toFileURL(
          ????????????????????Platform.getBundle(pluginId).getEntry(
          "")).getPath();
          ????????????path?
          =?path.substring(path.indexOf("/")?+?1,?path.length());
          ????????}
          ?catch?(IOException?e)?{
          ????????????path?
          =?"";
          ????????????e.printStackTrace();
          ????????}

          ????????
          return?path;
          ????}
          其中FileLocator#toFileURL是在3.2中添加的,代替了原來(lái)的Platform#asLocalURL,并且對(duì)于FileLocator#toFileURL,if the plugin was a jar, it will extract the file into a temporary location
          posted on 2006-05-01 22:45 Long Long Ago 閱讀(772) 評(píng)論(0)  編輯  收藏 所屬分類: Eclipse
          主站蜘蛛池模板: 桂平市| 唐河县| 昌平区| 九龙县| 永昌县| 乌兰县| 南郑县| 开鲁县| 仁怀市| 唐山市| 来凤县| 潼南县| 佛学| 邵阳县| 荥经县| 九龙县| 清苑县| 鸡泽县| 阿拉善左旗| 大兴区| 日喀则市| 凤翔县| 九寨沟县| 贵港市| 张家界市| 南华县| 浦县| 新巴尔虎右旗| 缙云县| 错那县| 济南市| 咸阳市| 上饶市| 大宁县| 定结县| 吉木萨尔县| 秀山| 涞源县| 临海市| 合江县| 赤峰市|