Griffin
Griffin

Reputation: 842

Eclipse Java Project Error

I created a new project in Eclipse called Lottery. The first thing that happened was I recieved a weird icon on my project that I never seen before. enter image description here

I decided it was nothing and created a new class, called RandomNumberGenerator. Then it gave me the following error:

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

I have no idea what the problem is. Could somebody help? I can't create another class without an error!

Thanks in advance!

Upvotes: 2

Views: 7277

Answers (3)

user3129081
user3129081

Reputation: 1

i faced same problem when i am trying to create a simple helloword program in eclipse. it shows the "Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor" like these and any java package showing error.

Reason: We are trying to access JRE 1.X version but that jre is not available on our system. Example: we have installed jdk 7 but eclipse is trying to access JRE 8 system liberaries.

Solution:

Go to Eclipse-->Right click on project-->Java Build Path-->Liberaries-->Select JRE System Liberaries--> Remove then add preferred JRE system liberaries: Right click on project-->Java Build Path-->Libraries-->Select JRE System Liberaries--> Add Liberary-->JRE System Library-->Next-->Finish

I hope it will be helpful for that issue. I have also tried and resolved same.

Upvotes: 0

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181270

Do this:

Windows -> Show View -> Problems

You will have a detail of your project's errors. I would bet that is a classpath / buildpath / JRE configuration error.

Upvotes: 2

Yogesh Prajapati
Yogesh Prajapati

Reputation: 4870

this will help you

  1. in project property dialog , check that JRE System Liabrary is set properly or not in Java Build Path.

  2. in same dialog check builders option , if you are using javascript code than this may be happed.

Upvotes: 7

Related Questions