[OpenJDK 2D-Dev] <AWT Dev> java.awt.* properties initialization?
philip.race at oracle.com
Thu Oct 18 21:39:40 UTC 2018
Adding 2d-dev .. as most of these are actually for 2D, not AWT, despite
I have bugs filed to get rid of these two 2D properties :
https://bugs.openjdk.java.net/browse/JDK-8130264 : java.awt.printerjob
https://bugs.openjdk.java.net/browse/JDK-8130266 : java.awt.graphicsenv
Probably I could file another for "awt.toolkit", which is AWT.
The potential external use of these to inject replacments was made moot
So I don't think I'd bother "moving" them, more like replacing them &
then deleting this code.
fontpath used to be used as a workaround for failure by 2D to locate the
which probably is no longer needed due to better ways we have of doing
this these days.
We probably could remove that along with the code which reads it.
I'd have to think about where we could put the isInAquaSession() logic.
On 10/18/2018 07:22 AM, Roger Riggs wrote:
> There are a few java.awt.* properties that have support in the
> system.c native code based on
> the operating system. Most do not need to be in native code and
> decoupling the code
> would be a good cleanup.
> I'd like to look at the properties and move the initializations to a
> more appropriate place.
> Since they are not used in the java.base module it would be more
> appropriate for
> them to be handled in the java.desktop module and the appropriate
> At the moment, they all can be overridden by command line arguments
> in some cases, that seems to be unintentional and perhaps undesirable.
> Most could dispatch on the os_name system property to select the
> appropriate implementation class.
> I'd like to work through this issues and see if there are any special
> Thanks for any comments and advice.
> java.awt.graphicsenv: java.awt.GraphicsEnvironment.java
> "sun.awt.CGraphicsEnvironment" "sun.awt.X11GraphicsEnvironment"
> awt.toolkit : java.awt.Toolkit.java
> "sun.awt.X11.XToolkit" "sun.lwawt.macosx.LWCToolkit"
> java.awt.printerjob: java.awt.print.PrinterJob.java
> awt.headless: This may need native code specific to the Mac.
> isInAquaSession() ? NULL :"true";
> sun.java2d.fontpath: sun.font.SunFontManager
> The native initialization is hooked to an environment variable
> Is that initialization from the environment still used or needed?
More information about the 2d-dev