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

前端 未结 1 1704
执念已碎
执念已碎 2021-01-02 05:57

I\'ve been using Maven on Git Bash (64-bit) for a few months now, and suddenly it stopped working, and is now generating this error on any maven command:

myu         


        
1条回答
  •  轮回少年
    2021-01-02 06:59

    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 \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.

    0 讨论(0)
提交回复
热议问题