gpt4 book ai didi

maven - IntelliJ + Maven 错误 : Could not find or load main class root

转载 作者:行者123 更新时间:2023-12-01 04:50:15 52 4
gpt4 key购买 nike

我正在尝试将 Maven(捆绑的 Maven 3)与 IntelliJ 项目(Spring)一起使用。当我双击 Maven 生命周期步骤之一时,我收到以下错误:

"C:\Program Files (x86)\Java\jdk1.8.0_25\bin\java" -Dmaven.multiModuleProjectDirectory=project root "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7536 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=14.1.4 clean

Error: Could not find or load main class root

截图:enter image description here

我已经在 Google 和 StackOverflow 上搜索了几个小时,但没有找到解决问题的方法。

我刚开始使用 Maven,所以对它了解不多。

提前致谢。

最佳答案

问题是 IntelliJ Maven 设置中的一个空格。在 Build Tools > Maven > Runner 部分中,我将 VM 选项从

-Dmaven.multiModuleProjectDirectory=项目根目录

-Dmaven.multiModuleProjectDirectory="项目根"

关于maven - IntelliJ + Maven 错误 : Could not find or load main class root,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32760526/

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com