When I add this code below in my pom.xml to support Querydsl
Don't forget to check the setting of the Execution Environment in in your Eclipse Project Settings: Project Build Path -> Libraries -> JRE System Library.
If this is wrong (e.g. jre), switch this to a jdk one.
In my case, this solved the issue ("You need to run build with JDK or have tools.jar on the classpath." disappeared).
Then the approx. fourth line in the Maven Run Log changes from (e.g.)
...
Java home: C:\Program Files\Java\jre1.8.0_66
....
to
...
Java home: C:\Program Files\Java\jdk1.8.0_66\jre
...
Hope this helps.