Could not find the main class. Program will exit.

  用新搭建的eclipse IDE开发环境打开之前的eclipse工作空间之后,执行ant脚本报错:"Could not find the main class. Program will exit"。G了下资料,发现有人说,可能是更换环境之后,当前ant_home的目录依然指向之前eclipse plugins的ant,于是按照说明将Window->Preferences->Ant->Runtime中的ant_home置为当前eclispe plugins中的ant目录。但是依然没能解决问题。想了下,可能当前eclipse的某些配置确实受之前的影响,而这个唯一的影响点就是工作空间下的metadata,于是我将工作空间下的metadata删除,然后将之前的项目依次导入,执行ant脚本发现问题解决

原文地址:https://www.cnblogs.com/jingtao/p/1858314.html