JDK-8003898 : X11 toolkit can be chosen as the default toolkit.
  • Type: Sub-task
  • Component: client-libs
  • Sub-Component: java.awt
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2012-11-22
  • Updated: 2015-04-18
  • Resolved: 2012-11-23
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.
7Resolved 8 b68Fixed
Related Reports
Relates :  
Relates :  
In accordance with the AWT plan the support for X11 toolkit on Mac OS has to be removed. 
As a result the issues in that part of code are frozen. 

But for the case of remote ssh connection to Mac OS machine the X11 toolkit could be selected by AWT as default toolkit. That happens if OS variable DISPLAY is defined. 

The case is ordinal for JPRT computer. That leads to unpredictable test fails due to deadlock/exception in X11 toolkit initialization block. 
Suggested fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8003898/webrev.00/ XToolkit should not be selected for any varues of system-wide environment variables.

Diagnose: That is the bug in AWT. The file [jdk\src\solaris\native\java\lang\java_props_macosx.c] contains the bug line PreferredToolkit getPreferredToolkit() { static PreferredToolkit pref = unset; if (pref != unset) return pref; PreferredToolkit prefFromEnv = getPreferredToolkitFromEnv(); if (prefFromEnv != unset) return pref = prefFromEnv; if (isInAquaSession()) return pref = CToolkit; if (isXDisplayDefined()) return pref = XToolkit; <--------------- here it is! return pref = HToolkit; }