<AWT Dev> java.awt.* properties initialization?

Roger Riggs Roger.Riggs at oracle.com
Thu Oct 18 14:22:51 UTC 2018


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 package.

At the moment, they all can be overridden by command line arguments though
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 awt-dev mailing list