When I add this code below in my pom.xml
to support Querydsl
This issue was happening to me because as mentioned above, Eclipse itself was running through the JRE instead of the JDK.
I solved it by adding %JAVA_HOME%\bin to the front of my PATH environment variable.
I figured out what JVM eclipse was using by reading through: Find out what JVM Eclipse is running on