When I am compiling my Maven Project, it shows the below error (in image). Instead of the JRE, I Have mapped the JDK for compilation.
Any suggestion regarding how to fix this would be great
When I am compiling my Maven Project, it shows the below error (in image). Instead of the JRE, I Have mapped the JDK for compilation.
Any suggestion regarding how to fix this would be great
Make sure you JAVA_HOME (in Windows) variable points to installation of JDK, also make sure that version of JDK matches the one specified in pom.xml
Main reason would be the JAVA_HOME setup in the environment variable should be pointing to correct JDK location.
- Check System -> Advance System Settings
- Click on Environment variable
- Add variable JAVA_HOME -> "C:\Program Files\Java\jdk1.8.0_141;"
- Edit "path" -> append %JAVA_HOME%; to the existing text.