< prev index next >
src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/I18N.java
Print this page
*** 20,34 ****
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! #include <windows.h>
! extern "C" {
! BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
! LPVOID lpvReserved) {
! return true;
}
}
\ No newline at end of file
--- 20,57 ----
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+ package jdk.incubator.jpackage.internal;
! import java.util.ResourceBundle;
! class I18N {
! static String getString(String key) {
! if (PLATFORM.containsKey(key)) {
! return PLATFORM.getString(key);
! }
! return SHARED.getString(key);
! }
!
! private static final ResourceBundle SHARED = ResourceBundle.getBundle(
! "jdk.incubator.jpackage.internal.resources.MainResources");
!
! private static final ResourceBundle PLATFORM;
!
! static {
! if (Platform.isLinux()) {
! PLATFORM = ResourceBundle.getBundle(
! "jdk.incubator.jpackage.internal.resources.LinuxResources");
! } else if (Platform.isWindows()) {
! PLATFORM = ResourceBundle.getBundle(
! "jdk.incubator.jpackage.internal.resources.WinResources");
! } else if (Platform.isMac()) {
! PLATFORM = ResourceBundle.getBundle(
! "jdk.incubator.jpackage.internal.resources.MacResources");
! } else {
! throw new IllegalStateException("Unknwon platform");
! }
}
}
< prev index next >