Bug 549341

Summary: Changing Java JDK is difficult
Product: [Eclipse Project] JDT Reporter: Marco Sulla <eclipse.org>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: kashihara, stephan.herrmann, Vikas.Chandra
Version: 4.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Marco Sulla CLA 2019-07-17 06:17:49 EDT
When you want to change the JDK, you have to go to Project menu -> Properties and

1. go to Java Build Path -> Libraries -> remove the old Modulepath and add the new clicking on Modulepath, selecting Add Library -> JRE System Library -> Select the wanted JDK.

2. Go to Java Compiler, select if unselected Enable project specific settings and change Coompiler compliance level

3. Go to Project Facets and change the Version of Java facet

This is quite annoying. Can't be added a popup that asks you to do the changes in point 2 and 3 automatically if you want?
Comment 1 Eclipse Genie CLA 2021-07-07 06:52:13 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Marco Sulla CLA 2021-07-07 08:04:31 EDT
Sincerely, I disapprove the bot.
Comment 3 Stephan Herrmann CLA 2021-08-03 10:35:39 EDT
(In reply to Marco Sulla from comment #0)
> When you want to change the JDK, you have to go to Project menu ->
> Properties and
> 
> 1. go to Java Build Path -> Libraries -> remove the old Modulepath and add
> the new clicking on Modulepath, selecting Add Library -> JRE System Library
> -> Select the wanted JDK.

Have you seen that "Edit" (also double-click) is enabled for the "JRE System Library" node? I don't see a need to remove-then-add.

> 2. Go to Java Compiler, select if unselected Enable project specific
> settings and change Coompiler compliance level

Did you see
[x] Use compliance from Execution Environment ...
?

Any idea how JDT could do better than this?
 
> 3. Go to Project Facets and change the Version of Java facet

Java facets are not provided by JDT (is it webtools?).
If they don't have an option to refer to the selected Execution Environment that might be a relevant RFE on their side.


Aside: JDT/UI may not have seen this bug, because the assignee was not changed when moving from Core to UI. Not sure why.
Comment 4 Marco Sulla CLA 2021-08-04 03:39:37 EDT
(In reply to Stephan Herrmann from comment #3)
> Have you seen that "Edit" (also double-click) is enabled for the "JRE System
> Library" node? I don't see a need to remove-then-add.

Yes, now I see it. It should be added in newest version :)

> Java facets are not provided by JDT (is it webtools?).

Must I open another bug???
Comment 5 Eclipse Genie CLA 2023-11-16 16:18:53 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.