Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331067

Summary: JRE cache does not get updated when JRE changes
Product: [Eclipse Project] JDT Reporter: Steven Hung <sghung>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Steven Hung CLA 2010-11-24 17:22:15 EST
Build Identifier: Eclipse 3.7.0 I20101028-1441

If a project was created and targets a JRE and that JRE changes, the change are not reflected in the build path.

Reproducible: Always

Steps to Reproduce:
I will use a simple example to re-create the steps:
1. Copy a JDK folder into C:\MyJDK
2. Add the JRE in eclipse
3. Create a new java project and use the newly added JRE
4. Open the JRE System Library for the project, notice vm.jar is in the list
5. Close eclipse
6. Go to the JRE location, and move the vm.jar to another folder
7. Open eclipse
8. Now the vm.jar is missing from the build path

The example above is fairly simple, please feel free to contact me for a more detailed (and problematic) example.

Ideally, if the JDT could detect changes to the JRE and force a cache refresh, that would ensure that if jars were moved around, it would be added to the build path.
Comment 1 Darin Wright CLA 2010-11-25 09:21:55 EST

*** This bug has been marked as a duplicate of bug 266651 ***
Comment 2 Steven Hung CLA 2010-11-25 10:59:16 EST
(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of bug 266651 ***

(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of bug 266651 ***

The duplicated bug was reported in March 2009 and I haven't seen many updates since then. As a workaround, are there any API calls that can be made to force the JDT cache to be refreshed?