Suddenly multiple error messages [message #1220983] |
Mon, 16 December 2013 08:48  |
Eclipse User |
|
|
|
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 #1221907 is a reply to message #1221849] |
Wed, 18 December 2013 12:02   |
Eclipse User |
|
|
|
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 17:01   |
Eclipse User |
|
|
|
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] |
Wed, 18 December 2013 21:47  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08949 seconds