Maven classworlds.launcher.Launcher error in Git for Windows (64-bit)

社会主义新天地 提交于 2019-11-30 09:13:03

The first thing to test is the %PATH%: in a CMD session, set up a simplified PATH.

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%

Note how the C:\WINDOWS\... paths are kept at the end of the PATH: that is important.

Then prepend the path of your %JAVA_HOME%\bin, and of <maven>\bin.

And make sure to set M2_HOME to C:\apache-maven-3.5.0.

Finally, test your mvn command, both in the current CMD, or (in that same Windows) in a git bash session (typing just "bash")

Finally, depending on your program and your brand of OS, don't forget that with Windows 10 you now have WSL and a full-fledge Linux bash. That can be a possible alternative.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!