Home > Java > javaTutorial > Why Does Eclipse Show \'No Compiler is Provided\'?

Why Does Eclipse Show \'No Compiler is Provided\'?

Linda Hamilton
Release: 2024-12-05 00:36:16
Original
166 people have browsed it

Compiler Error: Running on a JRE Instead of JDK

When compiling projects in Eclipse using m2eclipse, users may encounter the error "No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?" This indicates that the project is attempting to compile with a Java Runtime Environment (JRE), which lacks the compilation capabilities of a Java Development Kit (JDK).

To resolve this issue, follow these steps:

  1. Navigate to Eclipse's Window > Preferences.
  2. Select Java > Installed JREs.
  3. Ensure that a JDK is installed and select it as shown below:

Why Does Eclipse Show

  1. Click OK.
  2. Right-click on the project and select Maven > Update Project.

Additionally, verify the Maven JRE settings by following these steps:

  1. Access the Run Configurations window through the Run menu.
  2. Select the Maven Build configuration.
  3. Navigate to the JRE tab and ensure that Workspace default JRE is selected.

By performing these steps, Eclipse will recognize the installed JDK and allow you to compile projects successfully.

The above is the detailed content of Why Does Eclipse Show \'No Compiler is 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