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 p
There are several options to specify.
Steps: Right on project in project explorer Go to Run-> Run Configuration -> Click Maven Build -> Click on your build config/or create a new config. You will see the window as the given snapshot below, click on JRE tab there.
You see you have 3 options 1) Workspace Default JRE 2)Execution Environment 3)Alternate JRE 1) Workspace Default JRE is set from 'Window' menu on the top -> Preferences -> Java -> Installed JREs -Here you can add your jdk 2) Execution Environment jdk can be set in pom.xml as mentioned by @ksnortum
maven-compiler-plugin
3.1
true
C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe
3) Alternate JRE can be used to select a jdk from your directory