Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You have to take into account that take Java is not able to process .property files which are not encoded in ISO-8859-1. If you do not do this, it is likely that you will get an error when starting, for example, {{dashboard.com }}:

Code Blocknoformat
 [root@JobScheduler ~]#
 /opt/sos-berlin.com/jobscheduler/scheduler/bin/dashboard.sh
 Exception in thread "main" java.util.MissingResourceException: Can't
 find bundle for base name
 com.sos.dailyschedule.SOSSchedulerDashboardMain, locale en
 at
 java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
 at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
 at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)
 at com.sos.localization.Messages.getBundle(Messages.java:81)
 at com.sos.localization.Messages.<init>(Messages.java:65)
 at
 com.sos.JSHelper.Basics.JSToolBox.setMessageResource(JSToolBox.java:69)
 at com.sos.JSHelper.Basics.JSToolBox.<init>(JSToolBox.java:55)
 at com.sos.i18n.I18NBase.<init>(I18NBase.java:63)
 at
 com.sos.dailyschedule.SosSchedulerDashboardMain.<init>(SosSchedulerDashboardMain.java:55)
 at
 com.sos.dailyschedule.SosSchedulerDashboardMain.main(SosSchedulerDashboardMain.java:50)

Here you have to carry out an intermediate step to convert from UTF-8 to ISO-8859-1, using the native2ascii program, which is part of the Java JDK:

Code Blocknoformat
 native2ascii -encoding utf-8 SOSSchedulerDashboardMain_ja.orig SOSSchedulerDashboardMain_ja.properties

The content of the file may look a little bit strange after conversion (smile))

Code Blocknoformat
 SOSDashB_ResetReseth1. = \u30ea\u30bb\u30c3\u30c8
 SOSDashB_Today = \u672c\u65e5\u5206\u8868\u793a
 SOSDashB_only_executed =executedh1. \u5b9f\u884c\u6e08\u306e\u307f\u8868\u793a
 SOSDashB_show_log_in_new_tab = \u30ed\u30b0\u3092\u65b0\u3057\u3044\u30bf\u30d6\u3067\u8868\u793a
 SOSDashB_open_scheduler =schedulerh1. JobScheduler\u3092\u958b\u304f
 SOSDashB_only_stand_alone_jobs = \u30b8\u30e7\u30d6\u306e\u307f\u8868\u793a
 SOSDashB_only_job_chainschainsh1. = \u30b8\u30e7\u30d6\u30c1\u30a7\u30fc\u30f3\u306e\u307f\u8868\u793a
 SOSDashB_only_with_error = \u30a8\u30e9\u30fc\u306e\u307f\u8868\u793a
 SOSDashB_only_runningrunningh1. = \u5b9f\u884c\u4e2d\u306e\u307f\u8868\u793a
 SOSDashB_only_successfull = \u6210\u529f\u306e\u307f\u8868\u793a
 SOSDashB_only_latelateh1. = \u9045\u5ef6\u306e\u307f\u8868\u793a
 SOSDashB_only_waiting = \u5f85\u6a5f\u306e\u307f\u8868\u793a
 SOSDashB_start_nownowh1. = \u5373\u6642\u5b9f\u884c
 SOSDashB_close = \u9589\u3058\u308b
 SOSDashB_new_loglogh1. = \u65b0\u898f\u30ed\u30b0
 SOSDashB_NAME_TAB_HISTORY = \u5b9f\u884c\u5c65\u6b74
 SOSDashB_NAME_TAB_PLANNED =PLANNEDh1. \u5b9f\u884c\u8a08\u753b
 SOSDashB_NAME_TAB_JOBNET = JobNet
 
No Format
 SOSDashB_FROM = \u81ea

Now include the ISO property file in the jar-file.
Use the "update" function of the jar-utility, don't create a new jar:

Code Blocknoformat
 C:\temp\jars>jar -uvf com.sos.dailyschedule.jar com/sos/dailyschedule/SOSSchedulerDashboardMain_ja.properties
 Add: com/sos/dailyschedule/SOSSchedulerDashboardMain_ja.properties

...