Eclipse build errors - java.lang.object cannot be resolved


Eclipse build errors - java.lang.object cannot be resolved


The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project


Solution:

The work around is to remove the JRE System Library from the project and then add it back again. 
Here are the steps:

  1. Go to properties of project with the build error (right click > Properties)
  2. View the "Libraries" tab in the "Build Path" section
  3. Find the "JRE System Library" in the list (if this is missing then this error message is not an eclipse bug but a mis-configured project)
  4. Remove the "JRE System Library"
  5. Hit "Add Library ...", Select "JRE System Library" and add the appropriate JRE for the project (eg. 'Workspace default JRE')
  6. Hit "Finish" in the library selection and "OK" in the project properties and then wait for the re-build of the project
  7. Hopefully the error will be resolved ...

Comments

Popular posts from this blog

Bash - Execute Pl/Sql script from Shell script

How to get client Ip Address using Java HttpServletRequest

How to install Portable JDK in Windows without Admin rights