Eclipse 插件在工作目录中找不到文件

时间:2020-12-31 02:44:34

标签: eclipse plugins eclipse-plugin filenotfoundexception

我正在开发一个 Eclipse 插件。在我的代码中,我通过 .java 打开一个 new File(filePath) 文件。但是,如果我提供从 /home 开始的绝对路径,插件才能找到该文件,否则我会得到 java.io.FileNotFoundException

该文件包含在 Binary Build 中的 Source Build 下的 Buildplugin.xml 中: enter image description here
文件 (ReversePolishNotation.java) 位于 testing 文件夹内的 /src 包中。

它也通过 build.properties 文件包含:
enter image description here

我希望插件从项目目录中找到文件。
这适用于不同文件夹中的另一个文件(但不适用于包中)。

我该怎么做?

0 个答案:

没有答案