[7u6] Review request for 7181027: [macosx] Unable to use headless mode

Anthony Petrov anthony.petrov at oracle.com
Wed Jul 11 07:34:36 PDT 2012


Indeed. Thanks for reminding about that. In this case I'm fine with your 
fix.

--
best regards,
Anthony

On 7/11/2012 6:29 PM, Leonid Romanov wrote:
> Hi,
> This had been my concern as well, but then I found this:
> http://cr.openjdk.java.net/~anthony/x-5-forceHeadless.0/src/share/classes/java/awt/GraphicsEnvironment.java.sdiff.html
> 
> Looks like you added this check as part of the fix for http://java.net/jira/browse/MACOSX_PORT-774
> Which means that this check is only useful for OS X, and therefore it's OK to replace it with another. 
>  
> 
> On 11.07.2012, at 17:56, Anthony Petrov wrote:
> 
>> Hi Leonid,
>>
>> Since GraphicsEnvironment is a shared class, I'm concerned with removing the check for "sun.awt.HeadlessGraphicsEnvironment" to determine whether we should run in headless mode. Can we keep this check in place, and also add the new one that checks the toolkit name?
>>
>> --
>> best regards,
>> Anthony
>>
>> On 7/11/2012 5:46 PM, Leonid Romanov wrote:
>>> Hi,
>>> Please review a fix for 7181027: [macosx] Unable to use headless mode. The problem here is that for headless mode  "java.awt.graphicsenv" system property should be CGraphicsEnvironment because the way GraphicsEnvironment.createGE() method works: it first instantiates GraphicsEnvironment instance and then wraps it with HeadlessGraphicsEnvironment if in headless mode. This means twe can't use java.awt.graphicsenv property to determine whether we are in headless mode or not. So, I've replaced it with a toolkit check: if it's HToolkit, then we are in headless.  Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181027
>>> Webrev: http://cr.openjdk.java.net/~leonidr/7181027/webrev.00/
>>> Thanks,
>>> Leonid.
> 


More information about the macosx-port-dev mailing list