您需要使用JDK运行构建或使用工具.Jar

时间:2017-10-06 06:15:40

标签: java xml maven servlets spring-data-jpa

in this part of POM.xml, i am getting error在pom.xml中获取以下错误:

您需要使用JDK运行构建或在类路径上使用工具.Jar ...

**我已经尝试将JDK添加为jre路径

**还在

中添加了tools.jar

配置构建路径 - 外部库

但没有运气......

2 个答案:

答案 0 :(得分:0)

解决方案1: 请尝试使用C:\Program Files\Java\jdk1.x.x_xx"C:\Program Files\Java\jdk1.x.x_xx\jre代替C:\Program Files\Java\jre7

解决方案2: Edit eclipse.ini个文件

-vm
C:\jdk1.7\bin\javaw.exe

答案 1 :(得分:0)

In Eclipse 
------------

Go to properties --> Java build path -->Add the JDK Don't add the jre.build and check.If not run build path double click the jre system library --> select the Installed JRE -->select edit ----> Add the external jar -->go to the java installed path C:\Program Files\Java\jdk1.8.0_91\lib select tools.jar .Now build it 

**Add the dependency**

<plugin>
  <groupId>com.mysema.maven</groupId>
  <artifactId>apt-maven-plugin</artifactId>
  <version>1.0.6</version>
  <executions>
    <execution> 
      <goals>
        <goal>process</goal>
      </goals>
      <configuration>
        <outputDirectory>target/generated-sources/java</outputDirectory>
        <processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
      </configuration>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
      <version>1.7</version>
      <scope>system</scope>
      <systemPath>${java.home}/../lib/tools.jar</systemPath>
     </dependency>
  </dependencies>
</plugin>