2

I am running mvn compile from the command line and am getting this:

[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: 04:12 min
[INFO] Finished at: 2017-02-24T10:19:32+00:00
[INFO] Final Memory: 24M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project spring-boot-sam
ple-atmosphere: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

I've seen this answer but it's for Eclipse.

Any suggestions

Snowcrash
  • 80,579
  • 89
  • 266
  • 376

2 Answers2

3

Set JDK instead of JRE as environment (download it if necessary)

JDK=JRE+Codingstuff (including a compiler)

kleopi
  • 460
  • 3
  • 13
3

you need to update environment variable( give JDK path in ENV variable ) here link how to set up

Adeel Ahmed
  • 413
  • 4
  • 16
yugi
  • 834
  • 1
  • 15
  • 28