您的位置:首页 > 编程语言 > Java开发

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

2017-04-03 12:13 561 查看
在使用maven对项目进行打包的时候,出现了JDK错误,导致编包报错,错误信息如下:



如何解决呢?解决方案如下:

以下内容转载于:http://www.kriblog.com/ide/sts/error-no-compiler-is-provided-in-this-environment.-perhaps-you-are-running-on-a-jre-rather-than-a-jdk.html

It's really a bad day for me, I have spend allot of time download zip version of latest Spring
Tool Suite based on Eclipse 4.4.1 and now I am getting following error.

Does anyone know what is the issue?

Thanks in advance !!

Posted by Navdeep on 2014-12-16 09:36:03.0

You can choose any of following solution to fix [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?. 


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

Click on Windows -> Preferences -> Java -> Installed JREs -> Add -> Standard VM and Select JAVA_HOME. 



 
Select New JRE from Installed JREs and Press OK




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

Most simple and working in all the scenario 
Step 1 - Open the installed directory of Spring Tool Suite (STS)
Step 2 - Right click on STS.ini
Step 3 - Enter -VM JAVA_HOME/bin/javaw.exe and restart Eclipse Spring Tool Suite (STS), Eclipse will automatically pickup this JDK.


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

Open the pom.xml and enter following highlighted line with correct JDK path !!

Good Luck !!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐