此环境中未提供编译器。也许您运行的是JRE而不是JDK?

久未见 提交于 2020-10-25 04:54:30

问题:

I'm compiling a project in Eclipse using m2eclipse. 我正在使用m2eclipse在Eclipse中编译一个项目。 I set the JDK path in Eclipse like this: 我在Eclipse中设置JDK路径,如下所示:

Windows-->preferences-->installed jres--> jdk1.7.xx  path

But this is showing an error 但这显示出错误

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE    rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.424s
[INFO] Finished at: Tue Oct 29 15:21:01 IST 2013
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-   plugin:3.1:compile (default-compile) on project TEST-WEB: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

解决方案:

参考一: https://stackoom.com/question/1KTD6/此环境中未提供编译器-也许您运行的是JRE而不是JDK
参考二: https://oldbug.net/q/1KTD6/No-compiler-is-provided-in-this-environment-Perhaps-you-are-running-on-a-JRE-rather-than-a-JDK
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!