[ 
https://issues.apache.org/jira/browse/DERBY-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536445
 ] 

Knut Anders Hatlen commented on DERBY-3142:
-------------------------------------------

It seems like the code intends to use derby.ui.locale. Here's the start of its 
main() method (in impl.tools.sysinfo.Main):

  public static void main(String args[]) {
        // adjust the application in accordance with derby.ui.locale and 
derby.ui.codeset
        LocalizedResource.getInstance();

This should normally work, but unlike the other tools, sysinfo has its own 
message file which is not read by LocalizedResource (because sysinfo is 
included in all jars, not only in derbytools.jar). So when sysinfo fetches the 
resource bundle with this call

    return ResourceBundle.getBundle("org.apache.derby.loc.sysinfoMessages");

the default locale is used instead of derby.ui.locale.

> sysinfo ignores derby.ui.locale
> -------------------------------
>
>                 Key: DERBY-3142
>                 URL: https://issues.apache.org/jira/browse/DERBY-3142
>             Project: Derby
>          Issue Type: Bug
>          Components: Localization, Tools
>    Affects Versions: 10.2.2.0, 10.3.1.4, 10.4.0.0
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>
> Sysinfo messages are localized using the system's default locale instead of 
> the locale specified by derby.ui.locale.
> Example:
> $ java -Dderby.ui.locale=de_DE -jar derbyrun.jar sysinfo|head                 
>  
> ------------------ Java Information ------------------
> Java Version:    1.6.0_01
> Java Vendor:     Sun Microsystems Inc.
> Java home:       /usr/jdk/instances/jdk1.6.0/jre
> Java classpath:  derbyrun.jar
> OS name:         SunOS
> OS architecture: x86
> OS version:      5.11
> Java user name:  kah
> Java user home:  /home/kah
> Setting the default locale works correctly:
> $ LC_ALL=de_DE.UTF-8 java -jar derbyrun.jar sysinfo|head
> ------------------ Java-Informationen ------------------
> Java-Version: 1.6.0_01
> Java-Anbieter: Sun Microsystems Inc.
> Java-Home: /usr/jdk/instances/jdk1.6.0/jre
> Java-Klassenpfad: derbyrun.jar
> Name des Betriebssystems: SunOS
> Architektur des Betriebssystems: x86
> Betriebssystemversion: 5.11
> Java-Benutzername: kah
> Java-Benutzerausgangsverzeichnis: /home/kah

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to