myeclipse用ant时出现could not find the main class program will exit
Published by admin on 08月 12, 2011
执行 Ant 脚本时弹出窗口出现以下错误:
—————————
Java Virtual Machine Launcher
—————————
Could not find the main class. Program will exit.
—————————
确定??
—————————
这种错误对用过 Java 的人来说还是很明白,找不到 Ant 的主类吗。不过说实话也困扰过我一段时间,也没去深究。说开了,症结就是 Eclipse 中的 ANT_HOME 指向不对。
解决办法:Eclipse 中进入 Window->Preferences->Ant->Runtime,在Classpath 标签页,看到 Ant Home Entries 指向的目录不对了(它仍然指向你上回的目录,而这个目录应该不存在了),你要做的就是改变 Ant Home 指向正确的目录,点 Ant Home 按钮,选择 默认
上一篇文章:« jvm terminated exit code =-1
【版权说明】:本网页上有部分内容来源于网上收集,但不能保证资料的完整性和准确性,仅提供参考和学习。如有侵权请立即通知我们,我们将立即删除,谢谢合作!

Add A Comment