--- old/src/share/classes/java/awt/Toolkit.java 2013-09-11 13:21:29.000000000 +0400 +++ new/src/share/classes/java/awt/Toolkit.java 2013-09-11 13:21:29.000000000 +0400 @@ -1607,6 +1607,8 @@ * here, so that only one copy is maintained. */ private static ResourceBundle resources; + private static ResourceBundle platformResources; + /** * Initialize JNI field and method ids @@ -1655,6 +1657,15 @@ } static { + String osname = System.getProperty("os.name"); + + final String platformSuffix; + if (osname.contains("OS X")) { + platformSuffix = "osx"; + } else { + platformSuffix = null; + } + java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { public Void run() { @@ -1662,6 +1673,12 @@ resources = ResourceBundle.getBundle("sun.awt.resources.awt", CoreResourceBundleControl.getRBControlInstance()); + if (platformSuffix != null) { + platformResources = + ResourceBundle.getBundle("sun.awt.resources.awt" + platformSuffix, + CoreResourceBundleControl.getRBControlInstance()); + } + } catch (MissingResourceException e) { // No resource file; defaults will be used. } @@ -1682,6 +1699,15 @@ * This method returns defaultValue if the property is not found. */ public static String getProperty(String key, String defaultValue) { + // first try platform specific bundle + if (platformResources != null) { + try { + return platformResources.getString(key); + } + catch (MissingResourceException e) {} + } + + // then shared one if (resources != null) { try { return resources.getString(key);