JDK-8212701 : remove sun.desktop property from launcher code
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 9,10,11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-10-19
  • Updated: 2019-06-26
  • Resolved: 2019-04-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b21Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
The launcher sets sun.desktop to either windows or gnome.
It may once have been used to have it be motif on Solaris systems
as it is read by Swing's UIManager to choose the system L&F
I expect we can select defaults for each platform now
and leave sun.desktop as an option to be set by the application
and read by this same code. Or just remove it completely
from Swing as well as the launcher.
Here are the usage sites, the first of which is J2DBench !?
0 XMLHTMLReporter.java  1226 buffer.append("<tr><td
                             bgcolor=\"#f0f0f0\">sun.desktop</td><td>" +
1 XMLHTMLReporter.java  1227 sysProps.get("sun.desktop") + "</td></tr>");
2 System.c               366 PUTPROP(props, "sun.desktop", sprops->desktop);
3 UIManager.java         660 String desktop = AccessController.doPrivileged(new
                             GetPropertyAction("sun.desktop"));
4 SynthLookAndFeel.java  807 AccessController.doPrivileged(new
                             GetPropertyAction("sun.desktop"));


Comments
Yes, I'd hoped to do it for 12 but ...
05-02-2019

Can we get this cleanup done in the next release. There are still unnecessary java.desktop property dependencies in the system.c native code.
05-02-2019