Skip to main content



      Home
Home » Newcomers » Newcomers » Errors in Eclipse after update Java
Errors in Eclipse after update Java [message #252831] Tue, 01 April 2008 03:50 Go to next message
Eclipse UserFriend
Originally posted by: MacAdam.eden.invalid

Hi,

Today I updated my Java version. Instead of using the Java installer, I
manually de-installed Java (Start -> Control Panel -> Add Remove
Programs), downloaded Java, and re-installed Java. After that I fired up
Eclipse, and found out that I have countless errors in my code, errors
like ...
The import java.util cannot be resolved
and ...
Observable cannot be resolved to a type

Clearly, Eclipse can't find the JDK. Can you help me what I need to
change where so I can continue developing?

Abel
Re: Errors in Eclipse after update Java [message #252835 is a reply to message #252831] Tue, 01 April 2008 04:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: newsgroups.pellaton.li

Hello

The JDK location on the disk might have changed.

- in Eclipse, open the preferences dialog: "Window" > "Preferences..."
- browse to: "Java" > "Installed JREs"
- select the JRE you want to change and hit [Edit...]
- now, the "Edit JRE" dialog pops up
- [Browse...] to the new location of the JDK

HTH

Michael Pellaton
Re: Errors in Eclipse after update Java [message #252839 is a reply to message #252835] Tue, 01 April 2008 05:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: MacAdam.eden.invalid

Michael Pellaton wrote:
> - in Eclipse, open the preferences dialog: "Window" > "Preferences..."
> - browse to: "Java" > "Installed JREs"
> - select the JRE you want to change and hit [Edit...]
> - now, the "Edit JRE" dialog pops up
> - [Browse...] to the new location of the JDK

Hi Michael,

Thanks for your feedback. When I tried your suggestion I saw it was not
necessary. Eclipse had automagically reset the 'Installed JREs' to the
new location.

I have the following entry in the 'Installed JREs' preference:
Name: jre1.6.0_05
Location: C:\Program Files\Java\jdk1.6.0_05
Type: Standard VM

And that is as it should be, isn't it?

But still the errors persist. Although my Java classes have countless
errors, I only have two in my Problem View:
Severity and Description Path Resource Location Creation Time Id
- The project was not built since its build path is incomplete. Cannot
find the class file for java.lang.Object. Fix the build path then try
building this project
- Severity and Description Path Resource Location Creation Time Id
The type java.lang.Object cannot be resolved. It is indirectly
referenced from required .class files

Anyone know how I can solve my current problem? Do I have to reinstall
Eclipse again (I would prefer not, as I have several libraries
installed, as Mylin, PHP, SQL Development, Tomcat etc.

Abel.
Re: Errors in Eclipse after update Java [message #252843 is a reply to message #252835] Tue, 01 April 2008 05:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: MacAdam.eden.invalid

Michael Pellaton wrote:
> - in Eclipse, open the preferences dialog: "Window" > "Preferences..."
> - browse to: "Java" > "Installed JREs"
> - select the JRE you want to change and hit [Edit...]
> - now, the "Edit JRE" dialog pops up
> - [Browse...] to the new location of the JDK

I finally found out the cause of my problem. It was not the general
preferences (Window -> Preferences) but the project specific preferences
(right click project, choose Properties). In the 'Java Build Path' I had
a 'JRE System Library [jre1.6.0_03] Unbound'. After choosing Edit, I
selected 'Workspace default JRE (jre1.6.0_05) and everything went Hunky
Dory.

Evaluation:
You can install a new version of Java independently from Eclipse
(deinstall, download new version, reinstall). Eclipse will update the
JRE to the new version, but you need to change the 'Java Build Path'
manually to the new version ...
Re: Errors in Eclipse after update Java [message #252847 is a reply to message #252843] Tue, 01 April 2008 09:26 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Abel wrote:
> Michael Pellaton wrote:
>> - in Eclipse, open the preferences dialog: "Window" > "Preferences..."
>> - browse to: "Java" > "Installed JREs"
>> - select the JRE you want to change and hit [Edit...]
>> - now, the "Edit JRE" dialog pops up
>> - [Browse...] to the new location of the JDK
>
> I finally found out the cause of my problem. It was not the general
> preferences (Window -> Preferences) but the project specific preferences
> (right click project, choose Properties). In the 'Java Build Path' I had
> a 'JRE System Library [jre1.6.0_03] Unbound'. After choosing Edit, I
> selected 'Workspace default JRE (jre1.6.0_05) and everything went Hunky
> Dory.
>
> Evaluation:
> You can install a new version of Java independently from Eclipse
> (deinstall, download new version, reinstall). Eclipse will update the
> JRE to the new version, but you need to change the 'Java Build Path'
> manually to the new version ...

You only have the problem if your project specified a particular JRE
installation in its libraries, which is not recommended. By selecting
the Workspace Default option or an Execution Environment instead, you'll
never have that problem because Eclipse will automatically resolve those
to an appropriate JRE that is knows about.

Eric
Previous Topic:What means WTP, JEM, WST, JST and JPT ? Addons ?
Next Topic:Missing Plugins
Goto Forum:
  


Current Time: Sun May 11 19:03:17 EDT 2025

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

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

Back to the top