ㄓㄤㄑㄧㄤ

mac 系统升级到12.4后 mvn 命令 报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Mac OS系统升级到12.4之后,mvn命令忽然不能使用,报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 搜了许多办法不管用,后来修改了mvn启动命令解决。

找到maven的bin目录,找到mvn文件,vim mvn,增加一行JAVA_HOME=${JAVA_HOME}。替换成自己实际目录。

posted @ 2022-07-08 10:45  ㄓㄤㄑㄧㄤ  阅读(517)  评论(0编辑  收藏  举报
哈哈,页脚部分。