Eclipse issue with Maven build and JDK when generating Qclasses in Querydsl

后端 未结 9 743
感动是毒
感动是毒 2020-12-05 04:51

When I add this code below in my pom.xml to support Querydsl


  

        
9条回答
  •  旧巷少年郎
    2020-12-05 05:28

    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.

提交回复
热议问题