0 votes
1 view
in Java by (3.4k points)

  

I'm compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this:

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

But this is showing an error

[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?

  

1 Answer

0 votes
by (86.8k points)

Here is how you can solve the issue:

  • In Eclipse IDE, open Window > Preferences > Java > Installed JREs > and check your installed JREs. You should see an entry with a JDK there.
  • Select the Execution Env. Click OK
  • Right-Click on your Project -> Maven -> Update Project

Also, you have to change the Maven JRE. Open Run -> Run Configurations, select the Maven Build. After that, click the JRE tab and selected the option Workspace default JRE.

If you want to learn Java, then check out this Java Training by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 29, 2019 in Java by Suresh (3.4k points)
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...