Hello. I run build.xml, but the compiler produces errors. (At the same time, without the participation of Ant, the project is compiled and works fine.) One of the errors, as an example, is "type javax.swing.JComboBox does not take parameters". I remove the parameter - the error disappears, but the IDE gives a warning that the class is parameterized (and it is parameterized). Apparently, Ant and Eclipse use different versions of standard libraries. But I can not understand where the environment is turning for them. There are 2 ways in Installed JREs, and when using any of the ones listed there, an error message appears. Actually, the question is where does the IDE look and how can Ant get there?
Run -> External tools -> External tools configuration ... -> [configuration of your Ant Builder] -> JRE
Specify the same JRE as in the project.
In eclipse, the classpath is specified in the project's settings. in the case of ant, it is specified in the script itself (build.xml). It is not surprising that in 2 cases it works differently (after all, in eclipse you could easily change it with one click).
For a start, you can see the classpath in the project settings. If it did not help, you can do this:
File -> New -> Project -> Java project from existing ant build file ,
build.xml . Eclipse will create another project in it, you will see your code as it sees ant (as far as possible).