When I add this code below in my pom.xml
to support Querydsl
You could try with this in the pom:
<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>
And see if it changes anything. It should force tools.jar in the build path.
Edit. since that didn't help, try specifying
-vm
D:/work/Java/jdk1.6.0_13/bin/javaw.exe
in eclipse.ini (separate lines are important), as explained in this thread.
Try updating the JDK in Eclipse as below:
set the JRE in
look at the path below - having program files
(but in your mentioned path it is not having program files
in your path , usually java and all programs gets install in program files
so make sure that path)
Window->Preferences...->Java->Installed JREs:
JRE type: Standard VM JRE
Name: jdk1.6.0_18
JRE home directory: C:\Program Files (x86)\Java\jdk1.6.0_18
alos make sure JAVA_HOME
path is set properly to JDK\bin
properly(without any spaces and all in that path)
Try copying your JDK
to a different location and update your JAVA_HOME
with that new location.
let me know for any other issues.
I did it finally! I've tried so many option like this and this, but no luck. Then I read this comment that saved my life, really, thank you! I follow this solution and its working suddenly! should be accepted answer in my case.
I copied tools.jar from C:\Program Files\Java\jdk1.8.0_151\lib to C:\Program Files\Java\jre1.8.0_151\lib, after i execute mvn clean install – @julio mulcue burbano