the type JAVA. lang. object cannot be resolved. it is indirectly referenced from required. class files
This problem occurs when you reference JDK projects of different versions in eclipse. This is caused by the application of multiple JDK or JRE versions in your development environment. Eclipse selects the corresponding JRE by default according to the initial development environment. For example, there is an environment project developed by jdk1.4 in eclipse. when you introduce a project developed by jdk1.6 of a later version, the above problems will occur.
The solution is as follows:
Go to window \ preferences \ Java \ Installed jres
Press add --> browse... ---> select JRE installation path strength (My JRE path is D: \ Program Files \ Java \ jre1.6.0 _ 02) ---> OK
Right-click your project, right-click the properties option, and select the libraries tab on the right. ---> click Add library... --->
Select JRE system library... ---> next ---> select the corresponding version JRE under alternate JRE --> finish ---> OK
The above problems can be solved.