[英]Error: Could not find or load main class Tool
My configuration is below: 我的配置如下:
/usr/local/Cellar/maven/3.3.3/libexec
Maven主页: /usr/local/Cellar/maven/3.3.3/libexec
/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre
Java主目录: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre
I use Spring Tool Suite 3.7.1.RELEASE (Build Id: 201510041213). 我使用Spring Tool Suite 3.7.1.RELEASE(Build ID:201510041213)。
I did all settings about Java, Maven and STS but when I try to run any Maven command, STS is throwing this exception, although it runs on terminal correctly. 我已经完成了有关Java,Maven和STS的所有设置,但是当我尝试运行任何Maven命令时,STS都会抛出此异常,尽管它可以在终端上正确运行。
I had a project that I had been developing on STS version 3.6.4.RELEASE, but when I downloaded STS 3.7.1.RELEASE on a different PC, imported the project and tried to build/clean/... with maven, it would show this error ( Error: Could not find or load main class Tool
) as well. 我有一个我正在STS 3.6.4.RELEASE版本上开发的项目,但是当我在另一台PC上下载STS 3.7.1.RELEASE时,导入了该项目并尝试使用maven进行构建/清理/...。也会显示此错误( Error: Could not find or load main class Tool
)。
What I did was copy the version 3.6.4.RELEASE from one computer to the other computer, and then I could build the project. 我所做的是将3.6.4.RELEASE版本从一台计算机复制到另一台计算机,然后可以构建该项目。 I then proceeded to update STS through eclipse rather than downloading from the site, and now I'm running 3.7.1.RELEASE on the second computer and the project continues to be able to launch now :) 然后我继续通过eclipse而不是从站点下载来更新STS,现在我在第二台计算机上运行3.7.1.RELEASE,并且该项目现在仍然可以启动:)
AFAIK these were my steps then: AFAIK这些是我当时的步骤:
Hope this helps! 希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.