"Maven" MAVEN Web Project Package error: No compiler is provided in this environment. Perhaps running on a JRE rather than a JDK

Source: Internet
Author: User
Tags stack trace

The error is as follows in the packaging process:

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

[INFO] Scanning for projects ... [INFO] [INFO] Using the builder Org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread Count of 1[info] [INFO]-------------------------- ----------------------------------------------[INFO] Building firstspringbootexample 0.0.1-snapshot[info]-------- ----------------------------------------------------------------[INFO] [INFO]---maven-clean-plugin:2.6.1:clean ( Default-clean) @ firstspringbootexample---[info] Deleting d:\workspace2\firstspringbootexample\target[info] [INFO]- --Maven-resources-plugin:2.6:resources (default-resources) @ firstspringbootexample---[INFO] Using ' UTF-8 ' encoding To copy filtered resources. [INFO] Copying 0 Resource[info] Copying 0 Resource[info] [INFO]---maven-compiler-plugin:3.1:compile (default-compile) @ firsts Pringbootexample---[INFO] changes detected-recompiling the module! [INFO] Compiling 1 source file to D:\workspace2\firstspringbootexample\target\classes[info]----------------------------------------------------- --------[ERROR] Compilation error: [INFO]-------------------------------------------------------------[ERROR] No Compiler is provided in this environment. Perhaps is running on a JRE rather than a JDK? [INFO] 1 Error[info]-------------------------------------------------------------[INFO]------------------------- -----------------------------------------------[INFO] BUILD Failure[info]--------------------------------------- ---------------------------------[INFO] Total time:2.398 s[info] finished At:2017-10-01t17:41:26+08:00[info] Final Memory:13m/232m[info]------------------------------------------------------------------------[ERROR] Failed to Execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (Default-compile) on project Firstspringbootexample:compilation Failure[error] No compiler is provided in this environment. Perhaps you is running on A JRE rather than a JDK? [ERROR], [Help 1][error] [ERROR]-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 on the errors and possible solutions, please read the following articles:[error] [Help 1] http://c Wiki.apache.org/confluence/display/maven/mojofailureexception
View Code

Cause of the problem:

Running the project on the IDE is the JRE used, but the MAVEN packaging project requires the use of the JDK

Problem solving:

Window--->preferences--->java--->installed jres---->add a JDK came in

Then, in the process of packaging: Apply the JDK to MAVEN package.

For more details, please refer to the packing process: http://www.cnblogs.com/sxdcgaq8080/p/7617547.html

"Maven" MAVEN Web Project Package error: No compiler is provided in this environment. Perhaps running on a JRE rather than a JDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.