Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor




Asked on May 25, 2021
I have a Java Project in Eclipse. It is showing error in Java file.

1. Error message near class name

Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor

2. Error message near package name

Multiple markers at this line
- The type java.lang.Double cannot be resolved. It is indirectly referenced from required .class files
- The type java.lang.Short cannot be resolved. It is indirectly referenced from required .class files
- The type java.lang.Float cannot be resolved. It is indirectly referenced from required .class files
- The type java.lang.Byte cannot be resolved. It is indirectly referenced from required .class files
- The type java.lang.Integer cannot be resolved. It is indirectly referenced from required .class files
- The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
- The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
- The type java.util.function.Supplier cannot be resolved. It is indirectly referenced from required .
class files
- The type java.lang.Character cannot be resolved. It is indirectly referenced from required .class 
files
- The type java.lang.Long cannot be resolved. It is indirectly referenced from required .class files

How to resolve it?




Replied on May 25, 2021
You are getting error message in Eclipse because your Java library in not in project build path. You can configure is as following.

1. Right-click on project and then click on properties.

2. Click on Java Build Path.

3. Click on Libraries and then click on classpath.

4. Click on Add Library and then select your JDK.

5. Click on Apply and Close.

6. Clean and build the project from Project menu on the top of the Eclipse.




Replied on May 25, 2021
Thanks. It is working.

Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us