Friday, 22 April 2016

How to fix: Perhaps you are running on a JRE rather than a JDK


How to Fix: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

This basically happens when you have not set a JDK path in Eclipse.
To fix this Maven issue follow the below steps.

1. In Eclipse IDE goto Window > Preferences > Java > Installed JREs



2. Most likely you will have a JRE instead of a JDK, as shown above.

3. Now click on Add and select Standard VM.



4. Click Next.

5. Click on Directory and select a JDK folder and click OK.



6. You will see the JRE System Libraries window gets populated.



7. Now click on Finish.

8. Now select the newly created entry which says JDK and click OK.



9. After this you should be able to build the package additionally.


 NOTE:  Please ensure that you have the same version of Eclipse and Java. If you have a 64bit Eclipse you must use 64bit Java as well.

No comments:

Post a Comment

Coder Magnet
CoderMagnet is full of resources from our daily development activities. It has solutions for common problematic scenarios in technologies like Java 8, AEM, JCR and also occasionally gives you tips on Blogger as well.