Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Suddenly multiple error messages
Suddenly multiple error messages [message #1220983] Mon, 16 December 2013 13:48 Go to next message
Eustace Fril is currently offline Eustace FrilFriend
Messages: 13
Registered: December 2012
Junior Member
Suddenly I receive multiple errors in a program that used to run fine.

In an entry point class declaration (before public static void main...)
the error message says:

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

Also in the beginning of another java file the import statements give
errors like this:

The import java.awt cannot be resolved.
7 quick fixes available:
Create class 'Color' in package java.awt
....

What's wrong? Last time I had opened Eclipse everything was fine.

emf

--
Natal Transits Calculator
https://files.nyu.edu/emf202/public/jv/nataltransits.html
Re: Suddenly multiple error messages [message #1221154 is a reply to message #1220983] Tue, 17 December 2013 01:55 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 12/16/2013 7:48 AM, Eustace wrote:
> Suddenly I receive multiple errors in a program that used to run fine.
>
> In an entry point class declaration (before public static void main...)
> the error message says:
>
> Implicit super constructor Object() is undefined for default
> constructor. Must define explicit constructor.
>
> Also in the beginning of another java file the import statements give
> errors like this:
>
> The import java.awt cannot be resolved.
> 7 quick fixes available:
> Create class 'Color' in package java.awt
> ...
>
> What's wrong? Last time I had opened Eclipse everything was fine.
>
> emf
>
Have you recently upgraded your JDK/JRE? My guess would be that the JDK
defined to Eclipse is no longer available.

Go to Preferences->Java and looked for the Installed JRE section. Check
to make sure that a JRE is still able to be found. If not, update the
preferences to point to where it now resides.
Re: Suddenly multiple error messages [message #1221836 is a reply to message #1221154] Wed, 18 December 2013 14:10 Go to previous messageGo to next message
Eustace Fril is currently offline Eustace FrilFriend
Messages: 13
Registered: December 2012
Junior Member
On 2013-12-16 20:55 David Wegener wrote:
> On 12/16/2013 7:48 AM, Eustace wrote:
>> Suddenly I receive multiple errors in a program that used to run fine.
>>
>> In an entry point class declaration (before public static void main...)
>> the error message says:
>>
>> Implicit super constructor Object() is undefined for default
>> constructor. Must define explicit constructor.
>>
>> Also in the beginning of another java file the import statements give
>> errors like this:
>>
>> The import java.awt cannot be resolved.
>> 7 quick fixes available:
>> Create class 'Color' in package java.awt
>> ...
>>
>> What's wrong? Last time I had opened Eclipse everything was fine.
>>
>> emf
>>
> Have you recently upgraded your JDK/JRE? My guess would be that the JDK
> defined to Eclipse is no longer available.

Yes! Recently I installed JDK.

> Go to Preferences->Java and looked for the Installed JRE section. Check
> to make sure that a JRE is still able to be found. If not, update the
> preferences to point to where it now resides.

Thanks. I see there:

✔ jre7 C:\Program Files\Java\jre7 Standard VM

I clicked Search, I navigated to jre7, clicked OK and got this

Information: No jREs found in C:\Program Files\Java\jre7

I navigated to jdk1.7.0_45 and it found

jre C:\Program Files\Java\jdk1.7.0_45\jre

I checked this. However, the problem did not go away. What else should I do

emf

--
Google's top Spherical Triangle Calculator search result!
https://files.nyu.edu/emf202/public/js/spherical.html
Re: Suddenly multiple error messages [message #1221849 is a reply to message #1221836] Wed, 18 December 2013 14:40 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 12/18/2013 07:10 AM, Eustace wrote:
> [snip]
>
>> Go to Preferences->Java and looked for the Installed JRE section. Check
>> to make sure that a JRE is still able to be found. If not, update the
>> preferences to point to where it now resides.
>
> Thanks. I see there:
>
> ✔ jre7 C:\Program Files\Java\jre7 Standard VM
>
> I clicked Search, I navigated to jre7, clicked OK and got this
>
> Information: No jREs found in C:\Program Files\Java\jre7
>
> I navigated to jdk1.7.0_45 and it found
>
> jre C:\Program Files\Java\jdk1.7.0_45\jre
>
> I checked this. However, the problem did not go away. What else should I do

Eustace,

You're close. You should see something like this: (see attachment)
Re: Suddenly multiple error messages [message #1221907 is a reply to message #1221849] Wed, 18 December 2013 17:02 Go to previous messageGo to next message
Eustace Fril is currently offline Eustace FrilFriend
Messages: 13
Registered: December 2012
Junior Member
On 2013-12-18 09:40 Russell Bateman wrote:
> On 12/18/2013 07:10 AM, Eustace wrote:
>> [snip]
>>
>>> Go to Preferences->Java and looked for the Installed JRE section. Check
>>> to make sure that a JRE is still able to be found. If not, update the
>>> preferences to point to where it now resides.
>>
>> Thanks. I see there:
>>
>> ✔ jre7 C:\Program Files\Java\jre7 Standard VM
>>
>> I clicked Search, I navigated to jre7, clicked OK and got this
>>
>> Information: No jREs found in C:\Program Files\Java\jre7
>>
>> I navigated to jdk1.7.0_45 and it found
>>
>> jre C:\Program Files\Java\jdk1.7.0_45\jre
>>
>> I checked this. However, the problem did not go away. What else should
>> I do
>
> Eustace,
>
> You're close. You should see something like this: (see attachment)

Yes, I am seeing it. What next?

Also, there is something I do not understand. While the program in one
package displays all these error messages, an older program in another
package runs OK inside Eclipse. Could it be that there is something
wrong with the first package?

emf

--
Google's top Spherical Triangle Calculator search result!
https://files.nyu.edu/emf202/public/js/spherical.html
Re: Suddenly multiple error messages [message #1222035 is a reply to message #1221907] Wed, 18 December 2013 22:01 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 12/18/2013 10:02 AM, Eustace wrote:
> On 2013-12-18 09:40 Russell Bateman wrote:
>> On 12/18/2013 07:10 AM, Eustace wrote:
>>> [snip]
>>>
>>>> Go to Preferences->Java and looked for the Installed JRE section.
>>>> Check
>>>> to make sure that a JRE is still able to be found. If not, update the
>>>> preferences to point to where it now resides.
>>>
>>> Thanks. I see there:
>>>
>>> ✔ jre7 C:\Program Files\Java\jre7 Standard VM
>>>
>>> I clicked Search, I navigated to jre7, clicked OK and got this
>>>
>>> Information: No jREs found in C:\Program Files\Java\jre7
>>>
>>> I navigated to jdk1.7.0_45 and it found
>>>
>>> jre C:\Program Files\Java\jdk1.7.0_45\jre
>>>
>>> I checked this. However, the problem did not go away. What else should
>>> I do
>>
>> Eustace,
>>
>> You're close. You should see something like this: (see attachment)
>
> Yes, I am seeing it. What next?
>
> Also, there is something I do not understand. While the program in one
> package displays all these error messages, an older program in another
> package runs OK inside Eclipse. Could it be that there is something
> wrong with the first package?
>
> emf


The next step is to ensure that your project's class path stuff is
correct. Do the following:

1. Right-click on the project, choose Build Path -> Configure Build Path.

2. Click the Libraries tab.

3. Look for JRE System Library [jdk1.7.0_45].

You might be missing that library or you might have a different one with
a red decoration of sorts on it that means that the original JRE library
is actually missing. You need to correct this:

4. If a bad one is there, click to select and choose Remove. Then, ...

5. Click Add Library...

6. Click JRE System Library.

7. Next.

8. Either allow it to use the workstation default (which should be the
one I illustrated in a prior post) or make other arrangements (like find
another JDK you've downloaded to your host.

9. Click Finish.

That should sort things out.
Re: Suddenly multiple error messages [message #1222037 is a reply to message #1222035] Thu, 19 December 2013 02:47 Go to previous message
Eustace Fril is currently offline Eustace FrilFriend
Messages: 13
Registered: December 2012
Junior Member
On 2013-12-18 17:01 Russell Bateman wrote:
> On 12/18/2013 10:02 AM, Eustace wrote:
>> On 2013-12-18 09:40 Russell Bateman wrote:
>>> On 12/18/2013 07:10 AM, Eustace wrote:
>>>> [snip]
>>>>
>>>>> Go to Preferences->Java and looked for the Installed JRE section.
>>>>> Check
>>>>> to make sure that a JRE is still able to be found. If not, update the
>>>>> preferences to point to where it now resides.
>>>>
>>>> Thanks. I see there:
>>>>
>>>> ✔ jre7 C:\Program Files\Java\jre7 Standard VM
>>>>
>>>> I clicked Search, I navigated to jre7, clicked OK and got this
>>>>
>>>> Information: No jREs found in C:\Program Files\Java\jre7
>>>>
>>>> I navigated to jdk1.7.0_45 and it found
>>>>
>>>> jre C:\Program Files\Java\jdk1.7.0_45\jre
>>>>
>>>> I checked this. However, the problem did not go away. What else should
>>>> I do
>>>
>>> Eustace,
>>>
>>> You're close. You should see something like this: (see attachment)
>>
>> Yes, I am seeing it. What next?
>>
>> Also, there is something I do not understand. While the program in one
>> package displays all these error messages, an older program in another
>> package runs OK inside Eclipse. Could it be that there is something
>> wrong with the first package?
>>
>> emf
>
>
> The next step is to ensure that your project's class path stuff is
> correct. Do the following:
>
> 1. Right-click on the project, choose Build Path -> Configure Build Path.
>
> 2. Click the Libraries tab.
>
> 3. Look for JRE System Library [jdk1.7.0_45].
>
> You might be missing that library or you might have a different one with
> a red decoration of sorts on it that means that the original JRE library
> is actually missing. You need to correct this:
>
> 4. If a bad one is there, click to select and choose Remove. Then, ...
>
> 5. Click Add Library...
>
> 6. Click JRE System Library.
>
> 7. Next.
>
> 8. Either allow it to use the workstation default (which should be the
> one I illustrated in a prior post) or make other arrangements (like find
> another JDK you've downloaded to your host.
>
> 9. Click Finish.
>
> That should sort things out.

Almost. I had to make more changes, reimport stuff, asked me to create
Action Listener and then I had to delete the duplicate, etc. but now it
is working OK. It wasn't really that bad, with these automatic Eclipse
popup suggestions.

Just curious: I have a copy of the files in a jar file that has been
working OK all the time. Should I have just copied the contents of files
in the jar to the original ones? In fact, should I do it now, just in
case something has changed in the originals along the way?

Thanks,

emf

--
Natal Transits Calculator
https://files.nyu.edu/emf202/public/jv/nataltransits.html
Previous Topic:More than one Eclipse Installation in ubuntu 13.10
Next Topic:web service creation error
Goto Forum:
  


Current Time: Fri Apr 26 22:38:47 GMT 2024

Powered by FUDForum. Page generated in 0.09631 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top