title: Java - Intellij IDEA/maven error: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
body: <p>I have recently installed centOS. I am trying to run a maven project on Intellij IDEA, I get the following output on my console:</p>
  
  <pre><code>**[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: 12.424 s
  [INFO] Finished at: 2018-06-24T11:40:34+05:30
  [INFO] Final Memory: 31M/290M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project sarvm: Compilation failure
  [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
  [ERROR] 
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException**
  </code></pre>
  
  <p>Any help will be greatly appreciated.</p>