I don't have commit rights yet (I don't have jdk8 Authorship yet either, nudge 
nudge, poke poke...)

-DrD-

> It's funny how TRUETRUE does the trick :)
> 
> Anyway, the fix looks fine to me. Thanks for resolving this issue.
> 
> Sergey, and/or Artem, could you please review it, too? We need this fix in 
> JDK 8.
> 
> 
> PS. I'll push this fix if David doesn't have commit rights to the awt-gate.
> 
> --
> best regards,
> Anthony
> 
> On 11/08/2013 12:20 AM, David DeHaven wrote:
>> 
>> Quick fix to reenable some automated testing that was broken by my recent 
>> fix to disable the X11 toolkit.
>> 
>> 
>> diff --git a/src/solaris/native/java/lang/java_props_macosx.c 
>> b/src/solaris/native/java/lang/java_props_macosx.c
>> --- a/src/solaris/native/java/lang/java_props_macosx.c
>> +++ b/src/solaris/native/java/lang/java_props_macosx.c
>> @@ -106,6 +106,12 @@
>>  }
>> 
>>  int isInAquaSession() {
>> +    // environment variable to bypass the aqua session check
>> +    char *ev = getenv("AWT_FORCE_HEADFUL");
>> +    if (ev && (strncasecmp(ev, "true", 4) == 0)) {
>> +        // if "true" then tell the caller we're in an Aqua session without 
>> actually checking
>> +        return 1;
>> +    }
>>      // Is the WindowServer available?
>>      SecuritySessionId session_id;
>>      SessionAttributeBits session_info;
>> 
>> 
>> 
>> 
>> Quick sanity check over a SSH session (where isInAquaSession was returning 
>> false):
>> 
>> jdk8-deploy daved$ AWT_FORCE_HEADFUL=false 
>> ./build/macosx-x86_64-normal-server-release/jdk/bin/java -jar 
>> ~/Desktop/SwingSet2.jar
>> 2013-11-07 12:13:21.647 java[5088:707] [JRSAppKitAWT markAppIsDaemon]: 
>> Process manager already initialized: can't fully enable headless mode.
>> Exception in thread "main" java.awt.HeadlessException
>>      at 
>> sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77)
>>      at SwingSet2.main(SwingSet2.java:224)
>> 
>> jdk8-deploy daved$ AWT_FORCE_HEADFUL=true 
>> ./build/macosx-x86_64-normal-server-release/jdk/bin/java -jar 
>> ~/Desktop/SwingSet2.jar
>> 
>> jdk8-deploy daved$ AWT_FORCE_HEADFUL=True 
>> ./build/macosx-x86_64-normal-server-release/jdk/bin/java -jar 
>> ~/Desktop/SwingSet2.jar
>> 
>> jdk8-deploy daved$ AWT_FORCE_HEADFUL=TRUE 
>> ./build/macosx-x86_64-normal-server-release/jdk/bin/java -jar 
>> ~/Desktop/SwingSet2.jar
>> 
>> jdk8-deploy daved$ AWT_FORCE_HEADFUL=TRUETRUE 
>> ./build/macosx-x86_64-normal-server-release/jdk/bin/java -jar 
>> ~/Desktop/SwingSet2.jar
>> 
>> jdk8-deploy daved$ AWT_FORCE_HEADFUL=AKASKLJ 
>> ./build/macosx-x86_64-normal-server-release/jdk/bin/java -jar 
>> ~/Desktop/SwingSet2.jar
>> 2013-11-07 12:14:04.606 java[5138:707] [JRSAppKitAWT markAppIsDaemon]: 
>> Process manager already initialized: can't fully enable headless mode.
>> Exception in thread "main" java.awt.HeadlessException
>>      at 
>> sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77)
>>      at SwingSet2.main(SwingSet2.java:224)
>> 
>> jdk8-deploy daved$ ./build/macosx-x86_64-normal-server-release/jdk/bin/java 
>> -jar ~/Desktop/SwingSet2.jar
>> 2013-11-07 12:14:18.351 java[5154:707] [JRSAppKitAWT markAppIsDaemon]: 
>> Process manager already initialized: can't fully enable headless mode.
>> Exception in thread "main" java.awt.HeadlessException
>>      at 
>> sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77)
>>      at SwingSet2.main(SwingSet2.java:224)
>> 
>> (SwingSet2 ran normally in the runs that did not produce a HeadlessException)
>> 
>> -DrD-
>> 

Reply via email to