Bug 195506 - Useless full workspace rebuild after updating one "Installed JRE"
Summary: Useless full workspace rebuild after updating one "Installed JRE"
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2007-07-05 06:23 EDT by bsquare Mising name CLA
Modified: 2007-10-30 08:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bsquare Mising name CLA 2007-07-05 06:23:05 EDT
Build ID: I20070621-1340

Steps To Reproduce:
1.have projects which use an 1.5 JRE to compile and launchers with 1.6 JRE
2.update the 1.6 JRE to a newer version
3.after validation, a full workspace rebuild is done which is not needed because the 1.5 JRE is still the same

More information:
The aim to compile with JRE1.5 is for compatibility (for our clients), and the aim to launch with JRE1.6 is for performances.

The update was from jdk1.6.0_01 to (very new) jdk1.6.0_02 (I have edited the JDK1.6 into my "Installed JRE" preferences instead of adding the new one, and updating all launchers.
Comment 1 Jerome Lanneluc CLA 2007-08-09 09:12:25 EDT
I'm not sure to understand step 1. What JRE is on your build path at the end of this step ? The 1.5 JRE or the 1.6 JRE ? 
Comment 2 bsquare Mising name CLA 2007-08-09 14:48:05 EDT
(In reply to comment #1)
> I'm not sure to understand step 1. What JRE is on your build path at the end of
> this step ? The 1.5 JRE or the 1.6 JRE ? 
> 

The 1.5 JRE.
Comment 3 Jerome Lanneluc CLA 2007-08-10 09:56:44 EDT
I cannot reproduce the full build. Can you please provide more detailed steps ?
Comment 4 bsquare Mising name CLA 2007-08-18 12:07:05 EDT
(In reply to comment #3)
> I cannot reproduce the full build. Can you please provide more detailed steps ?
> 

I think the key is that "updating from jdk1.6.0_01 to jdk1.6.0_02" was done editing the existing JDK under Eclipse; which mean editing the name and the path of the jdk1.6.0_01 according to the new jdk1.6.0_02 installation.
It is different of adding a new JDK "jdk1.6.0_02", removing the JDK "jdk1.6.0_01" and updating the JDK of the project.

Is it what you have exactly done ?
Comment 5 Jerome Lanneluc CLA 2007-08-20 06:11:39 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > I cannot reproduce the full build. Can you please provide more detailed steps ?
> > 
> 
> I think the key is that "updating from jdk1.6.0_01 to jdk1.6.0_02" was done
> editing the existing JDK under Eclipse; which mean editing the name and the
> path of the jdk1.6.0_01 according to the new jdk1.6.0_02 installation.
> It is different of adding a new JDK "jdk1.6.0_02", removing the JDK
> "jdk1.6.0_01" and updating the JDK of the project.
> 
> Is it what you have exactly done ?
> 
Yes, but it still doesn't do a full build. Please detail exactly what your doing (what JRE Eclipse is running on, what menus/actions you use).
E.g:
1. Started Eclipse with -vm d:\jdk1.5.jre\bin\java.exe
2. File > New > Java Project
3. Entered 'My Project' 
....
Comment 6 bsquare Mising name CLA 2007-08-23 15:54:38 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > I cannot reproduce the full build. Can you please provide more detailed steps ?
> > > 
> > 
> > I think the key is that "updating from jdk1.6.0_01 to jdk1.6.0_02" was done
> > editing the existing JDK under Eclipse; which mean editing the name and the
> > path of the jdk1.6.0_01 according to the new jdk1.6.0_02 installation.
> > It is different of adding a new JDK "jdk1.6.0_02", removing the JDK
> > "jdk1.6.0_01" and updating the JDK of the project.
> > 
> > Is it what you have exactly done ?
> > 
> Yes, but it still doesn't do a full build. Please detail exactly what your
> doing (what JRE Eclipse is running on, what menus/actions you use).
> E.g:
> 1. Started Eclipse with -vm d:\jdk1.5.jre\bin\java.exe
> 2. File > New > Java Project
> 3. Entered 'My Project' 
> ....
> 
This is all the steps:
1. launch eclipse:
eclipse -data /path/to/my/workspace -vmargs -Xmx768M 
2. Windows->Preferences
3. Java->Installed JRE
4. Select the "JDK1.6.0_01"
5. Edit
6. Browse
7. select "JDK1.6.0_02" root directory path then valid
8. update the name from "jdk1.6.0_01" to "jdk1.6.0_02"
9. Press OK Button

Do you succeed to reproduce now ?
Comment 7 Jerome Lanneluc CLA 2007-08-24 06:29:18 EDT
Nope. It still does'nt do a full build. 

Note that I had to make several assumptions to follow your steps:
- the default JRE on your system is "1.6.0_01"
- on step 1, /path/to/my/workspace points to an empty workspace (ie. no projects were ever created in this workspace, and all the settings are set to default)

I'm suspecting that you have projects in your workspace, but since the steps don't say so, I don't know what they are.
Comment 8 bsquare Mising name CLA 2007-08-24 07:40:07 EDT
(In reply to comment #7)
> Nope. It still does'nt do a full build. 
> 
> Note that I had to make several assumptions to follow your steps:
> - the default JRE on your system is "1.6.0_01"
> - on step 1, /path/to/my/workspace points to an empty workspace (ie. no
> projects were ever created in this workspace, and all the settings are set to
> default)
> 
> I'm suspecting that you have projects in your workspace, but since the steps
> don't say so, I don't know what they are.
> 

All those information are into my first report.
The workspace is not empty, and justly the default JRE is 1.5 !
Comment 9 Jerome Lanneluc CLA 2007-08-24 11:17:48 EDT
Attempting to make sense of all the information in this bug report, I followed these steps:

1. Unzip eclipse-java-europa-win32.zip to d:\eclipse\java-europa
2. Ensure D:\temp\195506 doesn't exist
3. Start eclipse.exe as follows: D:\eclipse\java-europa\eclipse\eclipse.exe -data D:\temp\195506 -vm d:\jdk1.5.0\jre\bin\java.exe
4. Close Welcome window
5. Window > Preferences > Java > Installed JREs
6, Add...
7. Enter "jdk1.6.0_01" as the JRE name
8, Enter "D:\jdk6_01" as the JRE home directory
9. OK
10. OK
11. File > New > Java Project
12. Enter "P" as the project name
13. Finish
14. File > New > Class
15. Enter "p" for the package
16. Enter "X" for the name
17. Check "public static void main(String[] args)"
18. Finish
19. Run > Open Run Dialog
20. Select Java Application
21. New launch configuration
22. JRE > Alternate JRE
23. Select jdk1.6,0_01
24. Run
25. Window > Preferences > Java > Installed JREs
26, Select jdk1.6.0_01
27. Edit
28. Change JRE name to "jdk1.6.0_02"
29. Change JRE home directory to "D:\jdk6_02"
30. OK
31. OK
Observe: No full build

Could you please follow these steps exactly, and tell me what you are doing differently ?
Comment 10 bsquare Mising name CLA 2007-09-21 17:35:47 EDT
(In reply to comment #9)
> Attempting to make sense of all the information in this bug report, I followed
> these steps:

I'd done almost all the same the "first time", but with some differences:
> 1. Unzip eclipse-java-europa-win32.zip to d:\eclipse\java-europa
Linux version.
> 2. Ensure D:\temp\195506 doesn't exist
> 3. Start eclipse.exe as follows: D:\eclipse\java-europa\eclipse\eclipse.exe
> -data D:\temp\195506 -vm d:\jdk1.5.0\jre\bin\java.exe
I didn't used the -vm argument.
> 4. Close Welcome window
> 5. Window > Preferences > Java > Installed JREs
> 6, Add...
> 7. Enter "jdk1.6.0_01" as the JRE name
> 8, Enter "D:\jdk6_01" as the JRE home directory
> 9. OK
> 10. OK
> 11. File > New > Java Project
> 12. Enter "P" as the project name
> 13. Finish
> 14. File > New > Class
> 15. Enter "p" for the package
> 16. Enter "X" for the name
> 17. Check "public static void main(String[] args)"
> 18. Finish
> 19. Run > Open Run Dialog
> 20. Select Java Application
> 21. New launch configuration
> 22. JRE > Alternate JRE
> 23. Select jdk1.6,0_01
> 24. Run
> 25. Window > Preferences > Java > Installed JREs
> 26, Select jdk1.6.0_01
> 27. Edit
> 28. Change JRE name to "jdk1.6.0_02"
> 29. Change JRE home directory to "D:\jdk6_02"
> 30. OK
> 31. OK
> Observe: No full build
> 
> Could you please follow these steps exactly, and tell me what you are doing
> differently ?

I've followed those minimalistic steps but unfortunately failed to reproduce the issue. I've tried with an important project (lots of classes, so the "full build progress bar" takes some time to fulfilled ...), and failed too.
My environment is now slightly different from the original environment into which I've observed the phenomenon. It surely explains why it is not so easy to reproduce.

Another (important ?) information is that I'd installed the "Eclipse IDE for Java Developers", had installed CDT and had disabled several plugins like MyLyn.

Asap I can, I'll try to reproduce the issue in a nearest environment but it might be hard to find time to perform it soon. I'll do my best effort.
Comment 11 Jerome Lanneluc CLA 2007-09-24 05:07:42 EDT
Thanks for your effort on this issue. I'm closing this bug as WORKSFORME for now, but don't hesitate to reopen if you have more information.
Comment 12 Frederic Fusier CLA 2007-10-30 08:15:55 EDT
Verified for 3.4M3 using I20071029-0010 build.