I have my JAVA_HOME set to:
C:\\Program Files (x86)\\Java\\jdk1.6.0_18
After I run maven ins
The solution is simple. Sometimes the Eclipse Windows → Preferences → Java → Installed JREs pointing to C:\Program files\Java\jre
.
When I changed it to C:\Program files\Java\JDK 6.0\jre
it is worked 100%.
Use menu Window → Preferences → Java → Installed JREs → Execution Environments -> click the checkbox on the right side.
File eclipse.ini needs the vm
argument to point to your JDK location.
Edit the eclipse.ini
file to point to your JDK home, something as follows -
-vm
C:\Program Files\Java\jdk1.6.0_06
This ensures that Eclipse would be running off the JDK and not any default JRE on your machine.
You can also make sure that Eclipse has all of the updated changes. To do this, right-click your project and then press the "Refresh" menu item.
Make sure the "-vm" in your eclipse.ini is on two sperate lines, ie:
-vm
C:\Program Files\Java\jdk1.6.0_06
I had the same issue on Amazon Linux. It turns out I had to install the developer version of the JDK:
sudo yum -y install java-1.7.0-openjdk-devel