简体   繁体   English

Maven 错误 | 错误:无法找到或加载主 class org.codehaus.plexus.classworlds.launcher.Launcher

[英]Maven Error | Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

I am unable to install/use Maven and getting the below error.我无法安装/使用 Maven 并收到以下错误。

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher错误:无法找到或加载主 class org.codehaus.plexus.classworlds.launcher.Launcher

Steps on installation:安装步骤:

  1. Downloaded Binary zip archive (3.8.5) and put it at root C:下载二进制 zip 存档 (3.8.5) 并将其放在根目录 C 中:
  2. Set Java Home and Maven home in system variables as "JAVA_HOME" and "MAVEN_HOME"将系统变量中的Java Home和Maven home设置为“JAVA_HOME”“MAVEN_HOME”
  3. Set Path variable in system variables as "%JAVA_HOME%\bin" and "C:\apache-maven-3.8.5\bin" respectively将系统变量中的Path变量分别设置为“%JAVA_HOME%\bin”“C:\apache-maven-3.8.5\bin”

Now if I use "maven -v" command on the command line it throws the above-mentioned class error.现在,如果我在命令行上使用“maven -v”命令,它会抛出上述 class 错误。

Also, if I use the same command in the bin directory of maven it gives results.另外,如果我在 maven 的 bin 目录中使用相同的命令,它会给出结果。

PS I have gone through many threads here but does not resolve my problem. PS我在这里经历了很多线程,但没有解决我的问题。

I put maven directory in Program files folder and updated path and it started working!我将 maven 目录放入 Program files 文件夹并更新路径,它开始工作了!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven错误:无法找到或加载主类org.codehaus.plexus.classworlds.launcher.Launcher - Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher Maven-错误:无法找到或加载主类org.codehaus.plexus.classworlds.launcher.Launcher - Maven - Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher Maven 错误:找不到或加载主类 org.codehaus.plexus.classworlds.launcher.Launcher - Maven error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher 升级到 Big Sur 1.6。 现在 maven 显示此错误:无法找到或加载主 class org.codehaus.plexus.classworlds.launcher.Launcher - Upgraded to Big Sur 1.6. Now maven shows this Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher 错误:在构建Maven 3.0.4时无法找到或加载主类org.codehaus.classworlds.Launcher - Error: Could not find or load main class org.codehaus.classworlds.Launcher while building Maven 3.0.4 错误:无法在 Java Spark 中找到或加载主类 org.apache.spark.launcher.Main - Error: Could not find or load main class org.apache.spark.launcher.Main in Java Spark 为什么./sbin/start-master.sh给出“错误:找不到或加载主类org.apache.spark.launcher.Main”? - Why does ./sbin/start-master.sh give “Error: Could not find or load main class org.apache.spark.launcher.Main”? 在 Eclipse IDE 中出现“错误:无法找到或加载主 class aQute.launcher.Launcher”,即使它在命令行中工作 - Getting "Error: Could not find or load main class aQute.launcher.Launcher" in Eclipse IDE even though it works in command line 错误:Java虚拟机启动器。 无法找到主类 - Error: Java Virtual Machine Launcher. Could not find the main class apache ant 无法找到或加载主类 org.apache.tools.ant.launch.Launcher - apache ant Could not find or load main class org.apache.tools.ant.launch.Launcher
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM