sun.util.CoreResourceBundleControl Java Examples
The following examples show how to use
sun.util.CoreResourceBundleControl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Bug6299235Test.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #2
Source File: Bug6299235Test.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #3
Source File: LWCToolkit.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #4
Source File: Bug6299235Test.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #5
Source File: LWCToolkit.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #6
Source File: Bug6299235Test.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #7
Source File: LWCToolkit.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #8
Source File: Bug6299235Test.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #9
Source File: Bug6299235Test.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #10
Source File: Bug6299235Test.java From hottub with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #11
Source File: LWCToolkit.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #12
Source File: LWCToolkit.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #13
Source File: Bug6299235Test.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #14
Source File: LWCToolkit.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #15
Source File: Bug6299235Test.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #16
Source File: LWCToolkit.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #17
Source File: LWCToolkit.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #18
Source File: Bug6299235Test.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #19
Source File: Bug6299235Test.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #20
Source File: LWCToolkit.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #21
Source File: LWCToolkit.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@Override public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #22
Source File: Bug6299235Test.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String args[]) throws Exception { /* Try to load "sun.awt.resources.awt_ru_RU.properties which * is in awtres.jar. */ ResourceBundle russionAwtRes = ResourceBundle.getBundle("sun.awt.resources.awt", new Locale("ru", "RU"), CoreResourceBundleControl.getRBControlInstance()); /* If this call throws MissingResourceException, the test fails. */ if (russionAwtRes != null) { String result = russionAwtRes.getString("foo"); if (result.equals("bar")) { System.out.println("Bug6299235Test passed"); } else { System.err.println("Bug6299235Test failed"); throw new Exception("Resource found, but value of key foo is not correct\n"); } } }
Example #23
Source File: Toolkit.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public Void run() { try { resources = ResourceBundle.getBundle("sun.awt.resources.awt", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } return null; }
Example #24
Source File: Toolkit.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Void run() { try { resources = ResourceBundle.getBundle("sun.awt.resources.awt", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } return null; }
Example #25
Source File: UIDefaults.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns a Map of the known resources for the given locale. */ private Map<String, Object> getResourceCache(Locale l) { Map<String, Object> values = resourceCache.get(l); if (values == null) { values = new TextAndMnemonicHashMap(); for (int i=resourceBundles.size()-1; i >= 0; i--) { String bundleName = resourceBundles.get(i); try { Control c = CoreResourceBundleControl.getRBControlInstance(bundleName); ResourceBundle b; if (c != null) { b = ResourceBundle.getBundle(bundleName, l, c); } else { b = ResourceBundle.getBundle(bundleName, l); } Enumeration keys = b.getKeys(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); if (values.get(key) == null) { Object value = b.getObject(key); values.put(key, value); } } } catch( MissingResourceException mre ) { // Keep looking } } resourceCache.put(l, values); } return values; }
Example #26
Source File: LWCToolkit.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public ResourceBundle run() { ResourceBundle platformResources = null; try { platformResources = ResourceBundle.getBundle("sun.awt.resources.awtosx", CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } System.loadLibrary("awt"); System.loadLibrary("fontmanager"); return platformResources; }
Example #27
Source File: UIDefaults.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns a Map of the known resources for the given locale. */ private Map<String, Object> getResourceCache(Locale l) { Map<String, Object> values = resourceCache.get(l); if (values == null) { values = new TextAndMnemonicHashMap(); for (int i=resourceBundles.size()-1; i >= 0; i--) { String bundleName = resourceBundles.get(i); try { Control c = CoreResourceBundleControl.getRBControlInstance(bundleName); ResourceBundle b; if (c != null) { b = ResourceBundle.getBundle(bundleName, l, c); } else { b = ResourceBundle.getBundle(bundleName, l, ClassLoader.getSystemClassLoader()); } Enumeration keys = b.getKeys(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); if (values.get(key) == null) { Object value = b.getObject(key); values.put(key, value); } } } catch( MissingResourceException mre ) { // Keep looking } } resourceCache.put(l, values); } return values; }
Example #28
Source File: Toolkit.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public Void run() { try { resources = ResourceBundle.getBundle("sun.awt.resources.awt", Locale.getDefault(), ClassLoader.getSystemClassLoader(), CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } return null; }
Example #29
Source File: UIDefaults.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns a Map of the known resources for the given locale. */ private Map<String, Object> getResourceCache(Locale l) { Map<String, Object> values = resourceCache.get(l); if (values == null) { values = new TextAndMnemonicHashMap(); for (int i=resourceBundles.size()-1; i >= 0; i--) { String bundleName = resourceBundles.get(i); try { Control c = CoreResourceBundleControl.getRBControlInstance(bundleName); ResourceBundle b; if (c != null) { b = ResourceBundle.getBundle(bundleName, l, c); } else { b = ResourceBundle.getBundle(bundleName, l, ClassLoader.getSystemClassLoader()); } Enumeration keys = b.getKeys(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); if (values.get(key) == null) { Object value = b.getObject(key); values.put(key, value); } } } catch( MissingResourceException mre ) { // Keep looking } } resourceCache.put(l, values); } return values; }
Example #30
Source File: Toolkit.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public Void run() { try { resources = ResourceBundle.getBundle("sun.awt.resources.awt", Locale.getDefault(), ClassLoader.getSystemClassLoader(), CoreResourceBundleControl.getRBControlInstance()); } catch (MissingResourceException e) { // No resource file; defaults will be used. } return null; }