No compiler is provided in this environment perhaps you are running on a jre rather than a jdk

0 votes

While working on a project on Eclipse using m2eclipse, the JDK path was set in a way on Eclipse in the manner stated below but yet, it is coming to an error. What is the solution for this?

Windows-->preferences-->installed jres--> jdk1.7.xx path

[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: 1.424s 
[INFO] Finished at: Tue Oct 29 15:21:01 IST 2013
[INFO] Final Memory: 5M/15M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:3.1:compile (default-compile) on project TEST-WEB: Compilation failure 
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Feb 8, 2022 in Java by Soham
• 9,700 points
7,310 views

1 answer to this question.

0 votes

Once you are on your Eclipse integrated development environment, follow the respective order:-

Window > Preferences > Java > Installed JREs > and check your installed JREs. An entry with the JDK should be present. After which one must:-

  1. Click on the Execution Env as shown in the image below the answer, after which Click on OK

  2. Followed by Right-Clicking  on your Project -> Maven -> Update Project

Further on, Maven JRE will have to be altered in the given description:-

Goto Run -> Run Configurations, and then Maven Build must be chosen which is at the left side of the panel. After which, one must open a JRE tab and the Workspace default JRE option must be chosen or selected.

image

answered Feb 8, 2022 by Rahul
• 9,670 points

Related Questions In Java

0 votes
1 answer

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

In your Eclipse IDE, go into Window > Preferences > Java > Installed JREs > ...READ MORE

answered Jun 18, 2018 in Java by Parth
• 4,630 points
3,019 views
0 votes
2 answers

Why are you not able to declare a class as static in Java?

A static keyword  can be used with ...READ MORE

answered Jun 11, 2019 in Java by Neha
• 330 points
1,130 views
0 votes
1 answer

How to set path if java is installed in E drive or D drive rather than c

Hello, @Amazing, It doesn't really matter where you ...READ MORE

answered Sep 1, 2020 in Java by Roshni
• 10,520 points

edited Jul 4, 2023 by Khan Sarfaraz 3,658 views
0 votes
0 answers

Why does my JavaScript code receive a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error, while Postman does not?

I'm attempting to provide authorisation using JavaScript by connecting to the RESTful API integrated into Flask.  However, when I make the request, I receive the following error: XMLHttpRequest cannot load http://myApiUrl/login. No 'Access-Control-Allow-Origin' header ...READ MORE

Sep 20, 2022 in Java by Nicholas
• 7,760 points
277 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,503 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to split a string in Java

By using the appropriate method, this can ...READ MORE

answered Feb 9, 2022 in Java by Rahul
• 9,670 points

edited Jul 6, 2023 by Khan Sarfaraz 525 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP