0

I have this compilation error un maven

[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

But It's not possible because I have the jdk in my path: ;..;C:\PROGRA~2\Java\jdk1.7.0_71\bin

and:

C:\Development\Workspaces\EclipseWS\devices-project>java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

and here mvn -v :

C:\Users\joanet>mvn -v
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:
28+0100)
Maven home: C:\apache-maven-3.0.5\bin\..
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home: C:\PROGRA~2\Java\jdk1.7.0_71\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
  • possible duplicate of [Maven Package Compilation Error](http://stackoverflow.com/questions/15220392/maven-package-compilation-error) – kdoteu Sep 16 '15 at 20:06

1 Answers1

2

If you run mvn -v you will see what Maven thinks it is using

e.g.

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-15T03:59:23+10:30)
Maven home: /usr/local/Cellar/maven/3.2.5/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

Is your problem one of these StackOverflow errors?

Eclipse/Maven error: "No compiler is provided in this environment"

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

Maven error :Perhaps you are running on a JRE rather than a JDK?

Maven Package Compilation Error

Or any of the other google answers.

Community
  • 1
  • 1
Bae
  • 7,516
  • 5
  • 36
  • 42
  • true, its this: Java home: C:\PROGRA~2\Java\jdk1.7.0_71\jre, but I don't know from where it comes from, becasue I have my JAVA_HOME set to C:\PROGRA~2\Java\jdk1.7.0_71\ – Nuñito Calzada Aug 20 '15 at 14:43
  • Can you update your question with the results of mvn -v? – Bae Aug 21 '15 at 01:01