Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No compiler is provided in this environment with jenkins

I'm getting this error when I try a Jenkins build on a maven project:

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

The java and maven plugin are installed automatically, after several research, I couldn't find a solution!

Does anyone have ever face this issue?

like image 283
Ismail Sen Avatar asked Apr 22 '14 07:04

Ismail Sen


2 Answers

Go To Jenkins -> Manage Jenkins -> Global Tool Configuration -> JDK. Provide path to the JDK under JAVA_HOME field.

like image 95
sadhu Avatar answered Nov 01 '22 21:11

sadhu


First make sure the your Job in Jenkins doesn't use the "default Jdk" by going to the job: Press on Configure - > and roll to the JDK section - and make sure you have JDK configure instead of Default.

if you don't have it - go back to Jenkins - > Manage Jenkins -> Configure System - > Jdk and map your Jdk Root for Jenkins.

when you finish that - go back and choose your map JDK - and everything will work.

like image 10
Gil Avatar answered Nov 01 '22 20:11

Gil