native2ascii failed: Error starting Sun's native2ascii: sun.tools.native2ascii.M

执行mvn install命令 报错Error starting Sun's native2ascii

1.复制JDK目录下的lib文件夹的tools.jar到JRE目录下的lib文件夹下的ext文件夹
2.另外一个更好的办法就是把JRE的路径设置到JDK的目录下
Copying %Java_Home%/lib/tools.jar to  %Java_Home%/jre/lib/ext/tools.jar fixed this problem.
(a better approach is to set up JRE path to the directory JDK)

我是用第一种方法搞定的,注意说的是jdk自带的jre环境

你可能感兴趣的:(native2ascii failed: Error starting Sun's native2ascii: sun.tools.native2ascii.M)