Home > Java > javaTutorial > Maven Compilation Error: How to Fix \'No Compiler Provided\'?

Maven Compilation Error: How to Fix \'No Compiler Provided\'?

Linda Hamilton
Release: 2024-12-04 16:46:15
Original
711 people have browsed it

Maven Compilation Error: How to Fix

Maven Compilation Error: No Compiler Provided

When compiling a project in Eclipse using m2eclipse, it's crucial to ensure that you're using a Java Development Kit (JDK) rather than a Java Runtime Environment (JRE). If the error message "No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?" appears, follow these steps to rectify the issue:

  1. Verify Installed JREs:

    • Open your Eclipse IDE and navigate to Window > Preferences > Java > Installed JREs.
    • Check if there is an entry with a JDK listed.
  2. Select Execution Environment:

    • If a JDK is installed, select it as the Execution Env. Click OK to save the changes.
  3. Update Maven Project:

    • Right-click on the affected project and select Maven > Update Project.

Additional Solution:

If the above steps don't resolve the issue, try changing the Maven JRE.

  1. Go to Run > Run Configurations and select the Maven Build you're running.
  2. Click the JRE tab and select the "Workspace default JRE" option.

The above is the detailed content of Maven Compilation Error: How to Fix \'No Compiler Provided\'?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template