简体   繁体   中英

jenkins pipeline error No compiler is provided in this environment Perhaps you are running on a JRE rather than a JDK

I am using Amazon ec2 Linux server. I am getting the following error in the Jenkins pipeline output.

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

I tried to run the command on the server and its working well. I have updated JDK and MVN installation to my linux path in the global tool configuration but I am still getting this error.

You will have to do one more step. Open Jenkins, Locate "Manage Jenkins", click "Global Tool configuration", click "JDK installations", and under JDK set the JAVA_HOME to your JDK path. Hope this helps!

In addition to ranjithkr's answer, you need to add JAVA_HOME under the environment variables section in Jenkins -> Manage Jenkins -> Configure System -> Global Properties. This needs to be done after adding the JDK in Global tools configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM