--- old/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java 2013-09-26 17:42:26.358418300 +0400 +++ new/jdk/src/macosx/classes/sun/awt/CGraphicsEnvironment.java 2013-09-26 17:42:25.911392700 +0400 @@ -181,6 +181,9 @@ initDevices(); d = devices.get(mainDisplayID); + if (d == null) { + throw new AWTError("no screen devices"); + } } return d; }