How can I avoid this Ant Build error?

末鹿安然 提交于 2019-12-22 01:22:04

问题


What is this ant build error in eclipse?

When I click the Ant Build I have the error message shown below.

Build failed

Reason: Unable to find an Ant file to run.

Could you please help me solve it?


回答1:


Quoting from here

  1. Create a new project in Eclipse
  2. After the project is created, look in the package explorer window pane on the left and right click on the src folder.
  3. There are two methods for the next step, you could either add a New > Class, and then copy and paste everything from your old java file to the new class (make sure the class name is the same), or the better route would be to Import.
  4. After clicking Import, select File System under the general folder. Click Next.
  5. Browse for the java folder where your source files are located. Once you click ok, it will add all of the source files to the right pane.
  6. Select which files you want to add and click Finish.
  7. Now if you look at your Package Explorer window you should see the source files. Now just compile them, and the error shouldn't appear and you can run them just like before.


来源:https://stackoverflow.com/questions/23170959/how-can-i-avoid-this-ant-build-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!