one common solution for this like:
- this.getClass().getResources()
but this way force you have to put your resources into src directory of Eclipse, this won't work under situation: your plugin is a pure library plugin, i.e. it hasn't src directory at all and it's not a java project, which hasn't java nature in its .project file
A better solution I find is:
Bundle myBundle = Platform.getBundle(MY_BUNDLE_ID);
URL fileUrl = myBundle.getResource("/" + resourceName);
it support:
- your plugin can use any package style, say, as a jar, as a directory
- your resource can locate in src or just resource directory
分享到:
相关推荐
### Eclipse 插件(Lomboz、TomcatPlugin)及其安装、配置详解 #### 一、系统环境配置 在开始之前,我们需要确保系统环境满足以下条件: 1. **操作系统**: Windows 2000 Professional。 2. **Eclipse**: 版本 3.1.2...
此外,也可以通过 Eclipse 的“Help”-> “Install New Software...”中的“Manage Installed Software”选项来卸载插件。 ### 第3章 创建和导入项目 **3.1 创建一个 Maven 项目** **3.1.1 从 SCM 检出一个 Maven...
After installation, make sure the operability of all installed components. To do this, open the IDE, compile and launch a major demonstration project .\Demos\MainDemo\Project1_XE2.dpr Read next file ...
Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0 (org.activiti.designer.feature.feature.group 5.18.0) Missing requirement: Activiti Eclipse BPMN 2.0 Designer 5.18.0 (org.activiti....
Software being installed: Flowable Eclipse BPMN 2.0 Designer 5.22.0 (org.flowable.designer.feature.feature.group 5.22.0) Missing requirement: Graphiti (Incubation) 0.13.1.v20160830-1309 (org....
1.下载Eclipse plugin 补丁文件 org.eclipse.jdt.core_3.6.1.v_A68_R36x.jar: http://meiyoudao.download.csdn.net/ 2.将解压缩后的jar包 放到Eclipse的目录中的Plugin下面, 3.Android开发时代码提示卡死的问题...
Plugin Not Installed(解决方案).md
requires 'org.eclipse.emf 2.6.0' but it could not be found),解决方法:将“离线解决方案”文件夹中的org.eclipse.emf 2.6.0的jar,拷贝到自己的eclipse的plugin文件夹下面,重启eclipse再次安装activiti插件就...
Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) Missing requirement: Activiti Eclipse BPMN 2.0 ...
2. 打开 Eclipse,并在 Window 菜单中选择 Preference,接着选择 Java -> Installed JREs。 3. 在 Installed JREs 列表中,选择 Eclipse 正在使用的 JRE,然后点击 Edit。 4. 在 JRE 编辑对话框中,选择 rt.jar,...
JPF 的 Eclipse 环境安装运行过程 JPF(Java Pathfinder)是一款基于 Java 的路径查找工具,用于软件测试和验证。为了在 Eclipse 环境中使用 JPF,需要安装和配置 JPF 的核心组件和 Eclipse 插件。下面将详细介绍 ...
download from github,and have build it by: Run mvn clean package to create the plugin .hpi file. To install: 1. copy the resulting ./target/credentials.hpi file to the $JENKINS_HOME/plugins ...
To set a JDK as default JRE for Eclipse open the preference window : Window -> Preferences -> Java -> Installed JREs. This JRE must be a JDK (This is a Tomcat prerequisite). The plugin sets itself ...
2. **复制更多插件**:同样地,将`C:/Program Files/Adobe/FlexBuilder3Plugin/eclipse`目录下的`features`和`plugins`目录复制到Eclipse目录中,进行进一步的覆盖操作。 3. **拷贝SDK目录**:虽然非必需,但可将`C:...
为了在Eclipse中使用Java 8,首先需要确保Eclipse的JRE配置指向的是Java 8环境,这可以通过Window > Preferences > Java > Installed JREs来设置。同时,Eclipse的版本也需要与Java 8兼容,通常,较新的Eclipse版本...
Eclipse+ProGuard配置 Eclipse 是一个基于 Java 的集成开发环境(IDE),ProGuard 是一个 Java 类库和应用程序的保护和优化工具。通过结合使用 Eclipse 和 ProGuard,可以对 Java 应用程序进行混淆、压缩和优化,...
Eclipse是一款广泛使用的开源集成开发环境(IDE),主要用于Java编程,但通过插件也可支持其他编程语言。在本文中,我们将详细介绍如何安装Eclipse以及与之搭配的Java Development Kit(JDK)8版本。 首先,我们...