Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333576 - [jre] "JRE System Library" default not used properly after Java update
Summary: [jre] "JRE System Library" default not used properly after Java update
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.6.2   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 266651
Blocks:
  Show dependency tree
 
Reported: 2011-01-05 10:54 EST by Michael Rennie CLA
Modified: 2011-01-05 12:47 EST (History)
12 users (show)

See Also:
curtis.windatt.public: review+


Attachments
fix (8.06 KB, patch)
2011-01-05 11:28 EST, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2011-01-05 10:54:07 EST
This is a good candidate for 3.6.2 as well. It is a small fix that prevents OS updates from breaking Eclipse settings / workspaces.

+++ This bug was initially created as a clone of Bug #266651 +++

Build ID: M20080911-1700

Steps To Reproduce:
1. Updated Sun Java 1.6.0-u7 to 1.6.0-u11 via SuSE's updater.
2. /usr/bin/java -> /etc/alternatives/java -> /usr/lib/jvm/jre-1.6.0.u11-sun/bin/java , similar for /usr/lib/jvm/* (SuSE automatically updated where the system Java points to)
2. Restarted computer and Eclipse
3. Opened same workspace again
4. Projects failed (see Actual result below)
5. Package Explorer | myproject | context menu | Properties | Java Build Path | Libraries shows "JRE System Library [java-1.6.0.u11-sun-1.6.0.u11]", which is correct: the new and existing Java.
6. I looked everywhere I could find, in Project settings and Window | Preferences, I couldn't see any u7 referenced.


Actual result:
Description	Resource	Path	Location	Type
Project 'myproject' is missing required library: '/usr/lib/jvm/java-1.6.0.u7-sun-1.6.0.u7/jre/lib/resources.jar'	myproject		Build path	Build Path Problem

Expected result:
Uses new Java version.

Workaround:
In Package Explorer | myproject | context menu | Properties | Java Build Path | Libraries , double-click on "JRE System Library [java-1.6.0.u11-sun-1.6.0.u11]". A dialog comes up, saying "(*) Workspace default JRE (java-1.6.0.u11-sun-1.6.0.u11)". Instead, check "( ) Alternate JRE [java-1.6.0.u11-sun-1.6.0.u11]" and click "Finish" button. The Error goes away. Go in the same dialog again and check "Workspace default JRE" again. The error goes not come back, although it's now the same setting as it was when the error appeared. This confirms that it's an Eclipse bug.

More information:
Comment 1 Michael Rennie CLA 2011-01-05 11:28:21 EST
Created attachment 186098 [details]
fix
Comment 2 Michael Rennie CLA 2011-01-05 11:30:41 EST
Branched jdt.launching and applied patch to 3.6.2.

Please verify Curtis.
Comment 3 Curtis Windatt CLA 2011-01-05 12:47:24 EST
Verified.