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?

Rana
  • 5,912
  • 12
  • 58
  • 91
  • This problem seems to be very specific to jEdit and their build system. The first 4 errors in your screenshot deal with testing dependencies - this might as well not being called your ant script (side note: that's one reason why maven is soooo much better than ant) – Jan Groth Sep 26 '14 at 04:59
  • That's non-sense. Ant with Ivy is a million better than crappy Maven. And Gradle beats both to the ground completely. ;-) – Vampire Sep 27 '14 at 18:01

2 Answers2

1

Building jEdit In Eclipse and Ant

The best way to debug JEdit in Eclipse that I have found is this:

You are going to have to make sure you setup your eclipse environment, so that you can build JEdit using the "build.xml" file provided.

In particular, you need to make sure that the correct Ant versions, JDK, JRE, etc.. are setup in your Eclipse environment.

Next, you want to go to the File Menu

enter image description here

Then you will see this screen. (You have to filter it by typing "Ant" in the textbox for Wizards)

enter image description here

Find the path to your Ant "build.xml" File After you have completed importing that project, don't build from project build.

Instead find the build.xml file in the project, right click, and select - the "Run As" Item and then "Alternate Tools Configurations"

enter image description here

Then you will see this screen.

enter image description here

You will not see any of the Ant Build sub items, you have to click on the New Icon on the top left. (I circled it in Red) When you click that, you can add various parameters for the Ant Build. Really for our discussion here, all you need to do is select "Targets"

enter image description here

Then select these only - build, and run-debug

Next you want to click on the textbox at the top right, and edit the default name there and make it something like "jedit build.xml run-debug" or whatever will help you when you need it again.

Next click on the apply button, and then click on the Run button. If you can successfully build with all your environment settings, then you are all set for Eclipse debugging.

The best way to debug this application though, is to do this:

Find the path to your build.xml file on your box. copy the path. Go to command prompt, as Administrator change to the path you copied.

Then build JEdit by using Ant Build from outside on Command Line, such as: ant run-debug

This will start our build in debug mode keep in mind though, there is a timeout for this. so, after we start that, we next go back to Eclipse

With our project loaded in Eclipse, we go to Run\Debug Configurations Create a New Remote Java Application connection using localhost port 5005 or whatever port is used Then simply select "Debug"

enter image description here

enter image description here

We can then set breakpoints to trap our executions, this will allow us to "Debug" our application!!

And Bob's your Uncle!!!

CA Martin
  • 307
  • 2
  • 7
0

I guess you did not follow the Eclipse specific hints in the README.SRC.txt. Follow them and you should be fine. Or use a decent IDE instead (IntelliJ IDEA, the free community edition is absolutely sufficient). ;-)

Vampire
  • 35,631
  • 4
  • 76
  • 102