OSX Java application using awt always switches MacBook to discrete graphics. Bug or feature?

Claudio Nieder private at claudio.ch
Thu Aug 30 12:35:54 PDT 2012


Hi,

I notice that all my Java applications which use AWT libraries in any form switches my MacBook Pro Retina to the (more battery consuming) discrete graphics mode, even when drawing very simple things.

The following small program is enough to trigger the switch though it does not even open a window or draw anything.

import java.awt.GraphicsEnvironment;
public class Sleep
{
 public static final void main(final String[] args) throws InterruptedException
 {
  final GraphicsEnvironment b=GraphicsEnvironment.getLocalGraphicsEnvironment();
  Thread.sleep(Long.MAX_VALUE);
 }
}

Is this "bad behavior by design" or shall I file a bug report?

I observe this with JDK 7u8-b04 on OS X 10.8.1
$ java -version
java version "1.7.0_08-ea"
Java(TM) SE Runtime Environment (build 1.7.0_08-ea-b04)
Java HotSpot(TM) 64-Bit Server VM (build 23.4-b01, mixed mode)
$ uname -a
Darwin Claudios-MacBook-Pro.local 12.1.0 Darwin Kernel Version 12.1.0: Tue Aug 14 13:29:55 PDT 2012; root:xnu-2050.9.2~1/RELEASE_X86_64 x86_64

claudio
-- 
Claudio Nieder, Talweg 6, CH-8610 Uster, Tel +4179 357 6743, www.claudio.ch






More information about the macosx-port-dev mailing list