The problem and solution of Could not find the main class when executing Ant script in Eclipse

Tried it: https://blog.csdn.net/bookroader/article/details/2300337

But it doesn't work, I happened to see this article that is not directly related

https://blog.csdn.net/jiuyueguang/article/details/9350753

 

Think about it. The project is JDK1.5, and Eclipse is started with JDK1.8, so before Run as->Ant build, first Run as->External Tools Configurations, find the Ant Build that reported the error before, and then select Eclipse's JDK to start as shown below. Not the project's JDK.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325166556&siteId=291194637
Recommended