title: The type java.lang.object cannot be resolved - Eclipse buildpath not working
body: <p>I'm having a problem with Eclipse on by Mac OSX Mountain Lion. I have recently installed Android SDK and in my java projects I get the following message:</p>
  
  <blockquote>
    <p>The type java.lang.Object cannot be resolved. It is indirectly referenced 
    from required .class files</p>
  </blockquote>
  
  <p>Reading about <a href="https://stackoverflow.com/questions/12073222/java-lang-object-cannot-be-resolved-in-eclipse">this issue</a>, it would seem that I do not have a valid JRE defined in the build path of my project. Checking the project's build path with Properties > Java Build Path > Libraries I see that The JRE System Library has a red cross next to it. However when I click Add Library... > JRE System Library I get the message:</p>
  
  <blockquote>
    <p>An error has occured. See error log for more details.
    java.lang.NullPointerException</p>
  </blockquote>
  
  <p>I then try clicking Eclipse > Preferences > Java > Installed JREs and see an empty list. I try to Add... a Standard VM but I cannot find the location of my JRE. /Library/Java/JavaVirtualMachines/ is empty and /System/Library/Frameworks/JavaVM.framework does not exist.</p>
  
  <p>Does anyone know how I might fix this problem?</p>