0

I am trying to build the source code for jEdit project inside eclipse. In generally it gives a lots of error like as the below screenshot:

enter image description here

However, running the ant build command results in successful build output. I have added ant builder in the project properties and now running the 'Project->build' option results in ant build output which is also successful.

Now, how can I resolve the errors shown in eclipse 'Problems tab'? Shouldn't all dependencies etc be already inside the project as it succeeded the build?

4

2 回答 2

1

在 Eclipse 和 Ant 中构建 jEdit

我发现在 Eclipse 中调试 JEdit 的最佳方法是:

您必须确保设置好 eclipse 环境,以便可以使用提供的“build.xml”文件构建 JEdit。

特别是,您需要确保在您的 Eclipse 环境中设置了正确的 Ant 版本、JDK、JRE 等。

接下来,您要转到文件菜单

在此处输入图像描述

然后你会看到这个画面。(您必须通过在向导的文本框中键入“Ant”来过滤它)

在此处输入图像描述

找到 Ant “build.xml” 文件的路径 完成导入该项目后,不要从项目构建中构建。

而是在项目中找到 build.xml 文件,右键单击并选择 - “运行方式”项,然后选择“备用工具配置”

在此处输入图像描述

然后你会看到这个画面。

在此处输入图像描述

您将看不到任何 Ant Build 子项,您必须单击左上角的 New Icon。(我用红色圈出来了)当你点击它时,你可以为 Ant Build 添加各种参数。对于我们在这里的讨论,您需要做的就是选择“目标”

在此处输入图像描述

然后只选择这些 - build, and run-debug

接下来,您要单击右上角的文本框,并在那里编辑默认名称,使其类似于“jedit build.xml run-debug”,或者在您再次需要时可以帮助您。

接下来单击应用按钮,然后单击运行按钮。如果您可以使用所有环境设置成功构建,那么您就可以进行 Eclipse 调试了。

不过,调试此应用程序的最佳方法是执行以下操作:

在盒子上找到 build.xml 文件的路径。复制路径。转到命令提示符,管理员更改为您复制的路径。

然后在命令行上使用 Ant Build 从外部构建 JEdit,例如:ant run-debug

这将在调试模式下开始我们的构建,但请记住,这有一个超时。所以,在我们开始之后,我们接下来回到 Eclipse

在 Eclipse 中加载我们的项目后,我们转到 Run\Debug Configurations 使用 localhost 端口 5005 或使用的任何端口创建一个新的远程 Java 应用程序连接 然后只需选择“调试”

在此处输入图像描述

在此处输入图像描述

然后我们可以设置断点来捕获我们的执行,这将允许我们“调试”我们的应用程序!

鲍勃是你的叔叔!!!

于 2016-03-05T20:08:38.780 回答
0

我猜您没有遵循 README.SRC.txt 中的 Eclipse 特定提示。跟着他们,你应该没事。或者改用像样的 IDE(IntelliJ IDEA,免费社区版绝对足够)。;-)

于 2014-09-27T18:04:14.890 回答