Skip to content

SOLVED | No compiler is provided in the Environment? Perhaps you are running on a JRE rather than a JDK?

  • by

Sometimes when you are running Maven from command line or from Maven in an Azure DevOps agent you may get an error like the one noted below.

No compiler is provided in the Environment? Perhaps you are running on a JRE rather than a JDK?

Though Java is installed on the System and you will continue to get this error as newer version of Java change the order of environment variables on Windows.So verify whether Path variables and see whether you have something like

C:\Program Files (x86)\Common Files\Oracle\Java\javapath

If the answer is yes, then change the Path variable and set to something like ”
C:\Program Files\Java\jdk1.8.0_162\bin “

If you are still unsure what are the steps that needs to be followed exactly and if you are on Windows machine then follow the below steps

How to fix the error “No compiler is provided in the environment”



  1. Go to Window → Preferences → Java → Installed JREs.

  2. See whether there is any pointing to your JDK Path, if not then edit the JAVA_HOME button and add the path where JAVA is installed on your system.