I have done all the steps provided in http://www.tutorialspoint.com/jsf/jsf_environment_setup.htm
Apache Maven and Apache tomcat both are ready. I also set the envir
You need to set eclipse's default installed "jre" to a jdk. Eclipse Window Menu => Preferences => enter search string "jre" in left navigation pane => click on "Installed JREs" in left navigation pane => Click Add and browse to your JDK. => click the check box next to the JDK to make it default.
You may need to download and install the java jdk if you don't already have it.
Also ensure the eclipse run configuration is set to use the default jdk you set up: Run Menu => Run Configurations => Select the run config for your project (Maven Build) => Click JRE tab => Under Runtime JRE select "workspace default".
I delete my .m2 local local repository and re-run it. It works.
Delete repository from .m2 -> repository
and then right click on the project Run as... -> Maven install
.
After that, again right click on the project Maven -> Update project -> Check Update of Snapshots
and click on the Ok
option.
I am using windows OS with JDK 1.9 in eclipse Oxygen. I faced this issue while compiling the project with JDK 1.9 while using maven and I solved by changing mvn.cmd
file present in C:\apache-maven-3.5.2\bin
.
Before:
set "JAVACMD=C:\Program Files\Java\jdk-9.0.1\bin\java.exe"
After:
set "JAVACMD=C:\Program Files\Java\jdk1.8.0_91\bin\java.exe"
Also, make sure the compiler you use to build the project is correctly configured in IDE you use.
Check the JAVA version, It should be same across all the places. See screenshots.
Note: To see configuration window for 2 and 3... right click on the project and click properties