MacOS – eclipse wrong VM related to java 1.7

eclipsejavamacos

So I have been searching for hours on this.

So I installed java 1.7 on my mac before I realized I wanted/needed to use 1.6. I have managed to change everything so that the command line sees version 1.6. My issue is that whenever I try to compile something in eclipse it is saying "Specified VM install not found: type MacOS X VM, name Java SE 7 [1.7.0_45]"

I tried to reinstall 1.7 to see if that would fix things. It hasn't.

I am in OSX 10.8

EDIT:

The solution for now was to blow away my workspace and check everything out again

Best Answer

Eclipse is not good at updating its configuration :). go ahead and check for the right JRE in the following spots:

  • Eclipse global preferences (Eclipse preferences > Java > Installed JREs)
  • Project properties > Libraries

I had the same problem using ant build. The way to fix it there is by going to Run > External Tools > External tools configurations... and adjusting the JRE on the JRE tab