java.lang.Object cannot be resolved in Eclipse

后端 未结 18 2155
青春惊慌失措
青春惊慌失措 2020-12-13 09:12

When I installed the latest installment in Mac OSX - the Mountain Lion - I experienced some problems getting Eclipse to work I also lost most of my Android developer files

18条回答
  •  [愿得一人]
    2020-12-13 09:55

    I had that error almost every time I launched Eclipse for the first time; if I close and then re-open Eclipse, the error is gone.

    I found this solution useful, though (I've copied here to protect the link, credit goes to the original author):

    1. In Eclipse go to Windows -> Preferences -> Java -> Installed JREs.
    2. Select the currently active JRE/JDK and press the Edit button.
    3. Select the rt.jar and change its position in the list of JRE system libraries (e.g. press the Up button once).
    4. Confirm all changes, clean and rebuild the workspace.
    5. The next time you face the problem reposition the rt.jar again (or reset the order by pressing the Restore Default button).

提交回复
热议问题