最近给电脑升级了内存和SSD硬盘,安装好JDK后,之接把免安装的eclipse和代码复制到SSD,mavn clear成功,但是mavn install失败报如下错误:

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

点击eclipse菜单“Window/Java/Installed JREs”发现左侧面板中的jre指向的路径是C:\Program Files\Java\jre1.8.0_261,把其修改为C:\Program Files\Java\jdk1.8.0_261,就一切OK了。

  • 388
  • 0

共 0 回复