[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Locales and Java



dman wrote:
On Tue, Feb 12, 2002 at 10:31:25PM +0100, Andreas von Heydwolff wrote:
| >The 're' directory is for the "JRE" (Java Runtime Environment).  It is
| >all you need to _run_ java programs.  The "sdk" directory is for the
| >"SDK" (Software Development Kit) which is needed only if you want to
| >develop java programs (eg compile from source).
| >
| >| Should I just put the jars into the latter dir, or create the path you | >| mentioned?
| >
| >Either set $LANG to something that the app can handle, or make a
| >resource bundle (a file named
| >com/ibm/.../<basename>_<country code>.properties) in the CLASSPATH.
| | Thanks! I guess I will do the first. The secons seems to be beyond my | skills. Or it there some HowTo page I could use?

Either fix will work just as well (unless you actually translate the
messages in the properties file for the second option, in which case
you'll get native-language messages).


If I assume that the program is in "theprog.jar" and that the
resource bundle it is looking for is "/com/ibm/theprog/thedata" and
that it has a "en" version, try this :

$ mkdir /tmp/fix
$ cd /tmp/fix
$ jar -xvf /usr/share/java/theprog.jar
$ cp com/ibm/theprog/thedata_en.properties com/ibm/theprog/thedata_co.properties
        # replace 'co' with your country code
$ jar -cvf theprog.jar *
$ su root
# mv /usr/share/java/theprog.jar /usr/share/java/theprog_orig.jar
# cp theprog.jar /usr/share/java/theprog.jar


It is just a matter of sticking the properties file in the jar file.
The 'jar' program works much like 'tar' does (though the file format
is "zip" with the addition of some specially named files).

HTH,
-D



Hi and thanks again. Well, I changed

/tmp/fix/com/ibm/speechapps/speakpad/resources/spstrings_en_US.properties

  to

/tmp/fix/com/ibm/speechapps/speakpad/resources/spstrings_de_AT.properties

# jar -cvf speakpad.jar *

  then results in

adding: META-INF/ (in=0) (out=0) (stored 0%)
adding: META-INF/MANIFEST.MF java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:166)
        at sun.tools.jar.Main.addFile(Main.java:297)
        at sun.tools.jar.Main.create(Main.java:258)
        at sun.tools.jar.Main.run(Main.java:89)
        at sun.tools.jar.Main.main(Main.java:518)

and the size of the resulting *.jar archive is only 11kB instead of 280kB. The culprit META-INF/MANIFEST.MF reads

Manifest-Version: 1.0
Main-Class: com.ibm.speechapps.speakpad.SpeakPad
Created-By: 1.2.2 (Blackdown Java-Linux Team)
Class-Path: ./wcis.jar ../help/SpeakPadHelp.jar ../redist/jh.jar ../re
 dist/jmf.jar ./options.jar ./correction.jar ./spcomponents.jar

Interestingly, yesterday I upgraded testing to the latest testing libc6 version, and when defining the locales I did not set a language but chose default "C" but /etc/profiles remained as before with de_AT@euro.

Now vvstartdictation starts but I don't get sound into the program. As I also had moved the SB Live card from being hw 0 to hw 1 or due to the locales issue, trying to start

 vvstartaudiosetup

now exits with the following


---snip---

Starting ViaVoice Audio Setup
Java must be installed for ViaVoice Audio Setup to work.
Please wait while Java initializes...

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4038b7bd
Function name=_IO_vfprintf
Library=/lib/libc.so.6

Current Java thread:
at com.ibm.speechcomponents.user.VvUserOpts.VvUserOptsInitialize(Native Method)
        at com.ibm.speechcomponents.user.User.init(User.java:134)
        at com.ibm.speechcomponents.user.User.<init>(User.java:70)
at com.ibm.speechapps.userwizard.UWizMainCtlr.getUWizWelcome(UWizMainCtlr.java:641) at com.ibm.speechapps.userwizard.UWizMainCtlr.moveToWelcome(UWizMainCtlr.java:597) at com.ibm.speechapps.userwizard.UWizMainCtlr.<init>(UWizMainCtlr.java:145)
        at com.ibm.speechapps.userwizard.UWiz.init(UWiz.java:82)
        at java.beans.Beans.instantiate(Beans.java:312)
        at java.beans.Beans.instantiate(Beans.java:51)
at com.ibm.speechapps.userwizard.UWizAudSet.main(UWizAudSet.java:66)

Dynamic libraries:
08048000-0804c000 r-xp 00000000 03:02 359142 /usr/lib/j2re1.3/bin/i386/native_threads/java 0804c000-0804d000 rw-p 00003000 03:02 359142 /usr/lib/j2re1.3/bin/i386/native_threads/java
40000000-40014000 r-xp 00000000 03:02 162897     /lib/ld-2.2.5.so
40014000-40015000 rw-p 00013000 03:02 162897     /lib/ld-2.2.5.so
40016000-40017000 r--p 00000000 03:02 130841 /usr/lib/locale/en_US/LC_IDENTIFICATION 40017000-40018000 r--p 00000000 03:02 130839 /usr/lib/locale/en_US/LC_MEASUREMENT40018000-40019000 r--p 00000000 03:02 130838 /usr/lib/locale/en_US/LC_TELEPHONE 40019000-4001a000 r--p 00000000 03:02 130837 /usr/lib/locale/en_US/LC_ADDRESS 4001a000-4001b000 r--p 00000000 03:02 130836 /usr/lib/locale/en_US/LC_NAME 4001b000-4001c000 r--p 00000000 03:02 130751 /usr/lib/locale/en_US/LC_PAPER 4001c000-4001d000 r--p 00000000 03:02 130750 /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES 4001d000-4001e000 r--p 00000000 03:02 130749 /usr/lib/locale/en_US/LC_MONETARY 4001e000-40024000 r--p 00000000 03:02 130539 /usr/lib/locale/en_US/LC_COLLATE 40024000-40025000 r--p 00000000 03:02 130748 /usr/lib/locale/en_US/LC_TIME
40025000-40033000 r-xp 00000000 03:02 163230     /lib/libpthread-0.9.so
40033000-4003b000 rw-p 0000d000 03:02 163230     /lib/libpthread-0.9.so
4003b000-40046000 r-xp 00000000 03:02 375454 /usr/lib/j2re1.3/lib/i386/native_threads/libhpi.so 40046000-40047000 rw-p 0000a000 03:02 375454 /usr/lib/j2re1.3/lib/i386/native_threads/libhpi.so 40047000-4030a000 r-xp 00000000 03:02 325949 /usr/lib/j2re1.3/lib/i386/client/libjvm.so 4030a000-40321000 rw-p 002c2000 03:02 325949 /usr/lib/j2re1.3/lib/i386/client/libjvm.so
40339000-4033b000 r-xp 00000000 03:02 163174     /lib/libdl-2.2.5.so
4033b000-4033d000 rw-p 00001000 03:02 163174     /lib/libdl-2.2.5.so
4033d000-40455000 r-xp 00000000 03:02 163122     /lib/libc-2.2.5.so
40455000-4045b000 rw-p 00117000 03:02 163122     /lib/libc-2.2.5.so
4045f000-40460000 r-xp 00000000 03:02 163040 /lib/libBrokenLocale-2.2.5.so 40460000-40461000 rw-p 00000000 03:02 163040 /lib/libBrokenLocale-2.2.5.so
40461000-40472000 r-xp 00000000 03:02 163182     /lib/libnsl-2.2.5.so
40472000-40474000 rw-p 00010000 03:02 163182     /lib/libnsl-2.2.5.so
40477000-40498000 r-xp 00000000 03:02 163181     /lib/libm-2.2.5.so
40498000-40499000 rw-p 00020000 03:02 163181     /lib/libm-2.2.5.so
40499000-404ab000 r-xp 00000000 03:02 182349 /usr/lib/j2re1.3/lib/i386/libverify.so 404ab000-404ad000 rw-p 00011000 03:02 182349 /usr/lib/j2re1.3/lib/i386/libverify.so 404ad000-404d0000 r-xp 00000000 03:02 182350 /usr/lib/j2re1.3/lib/i386/libjava.so404d0000-404d2000 rw-p 00022000 03:02 182350 /usr/lib/j2re1.3/lib/i386/libjava.so404d3000-404e8000 r-xp 00000000 03:02 182351 /usr/lib/j2re1.3/lib/i386/libzip.so 404e8000-404eb000 rw-p 00014000 03:02 182351 /usr/lib/j2re1.3/lib/i386/libzip.so 404eb000-41204000 r--s 00000000 03:02 264961 /usr/lib/j2re1.3/lib/rt.jar 41231000-414d6000 r--s 00000000 03:02 264962 /usr/lib/j2re1.3/lib/i18n.jar 414d6000-414ec000 r--s 00000000 03:02 264654 /usr/lib/j2re1.3/lib/sunrsasign.jar 43594000-43595000 r--p 00000000 03:02 130747 /usr/lib/locale/en_US/LC_NUMERIC
43595000-4359f000 r-xp 00000000 03:02 163193     /lib/libnss_compat-2.2.5.so
4359f000-435a0000 rw-p 00009000 03:02 163193     /lib/libnss_compat-2.2.5.so
495ff000-4962a000 r--p 00000000 03:02 130746 /usr/lib/locale/en_US/LC_CTYPE 49696000-4969f000 r--s 00000000 03:02 265563 /usr/lib/j2re1.3/lib/ext/mlibwrapper_jai.jar 4969f000-49798000 r--s 00000000 03:02 265561 /usr/lib/j2re1.3/lib/ext/jai_core.jar 49798000-497c5000 r--s 00000000 03:02 265562 /usr/lib/j2re1.3/lib/ext/jai_codec.jar 497c5000-497cb000 r--s 00000000 03:02 265581 /usr/lib/j2re1.3/lib/ext/registryFile.jai 497cb000-49803000 r--s 00000000 03:02 50962 /usr/lib/ViaVoice/bin/classes/userwizardApp.zip 49803000-49af5000 r-xp 00000000 03:02 182358 /usr/lib/j2re1.3/lib/i386/libawt.so 49af5000-49b05000 rw-p 002f1000 03:02 182358 /usr/lib/j2re1.3/lib/i386/libawt.so 49b1b000-49b64000 r-xp 00000000 03:02 182357 /usr/lib/j2re1.3/lib/i386/libmlib_image.so 49b64000-49b66000 rw-p 00048000 03:02 182357 /usr/lib/j2re1.3/lib/i386/libmlib_image.so 49b66000-49b70000 r--s 00000000 03:02 50963 /usr/lib/ViaVoice/bin/classes/userwizardComponents.zip 49b70000-49b72000 r--s 00000000 03:02 50965 /usr/lib/ViaVoice/bin/classes/userwizardCtrls.zip
49b75000-49b7b000 r-xp 00000000 03:02 342835     /usr/X11R6/lib/libXp.so.6.2
49b7b000-49b7d000 rw-p 00005000 03:02 342835     /usr/X11R6/lib/libXp.so.6.2
49b7d000-49bc3000 r-xp 00000000 03:02 342838     /usr/X11R6/lib/libXt.so.6.0
49bc3000-49bc7000 rw-p 00045000 03:02 342838     /usr/X11R6/lib/libXt.so.6.0
49bc7000-49bce000 r-xp 00000000 03:02 342824     /usr/X11R6/lib/libSM.so.6.0
49bce000-49bd0000 rw-p 00006000 03:02 342824     /usr/X11R6/lib/libSM.so.6.0
49bd0000-49be3000 r-xp 00000000 03:02 342531 /usr/X11R6/lib/libICE.so.6.3 49be3000-49be5000 rw-p 00012000 03:02 342531 /usr/X11R6/lib/libICE.so.6.3 49be6000-49bf2000 r-xp 00000000 03:02 342827 /usr/X11R6/lib/libXext.so.6.4 49bf2000-49bf4000 rw-p 0000b000 03:02 342827 /usr/X11R6/lib/libXext.so.6.4 49bf4000-49bf8000 r-xp 00000000 03:02 342839 /usr/X11R6/lib/libXtst.so.6.1 49bf8000-49bf9000 rw-p 00003000 03:02 342839 /usr/X11R6/lib/libXtst.so.6.1 49bf9000-49cce000 r-xp 00000000 03:02 342825 /usr/X11R6/lib/libX11.so.6.2 49cce000-49cd3000 rw-p 000d4000 03:02 342825 /usr/X11R6/lib/libX11.so.6.2 49cd4000-49d69000 r-xp 00000000 03:02 182359 /usr/lib/j2re1.3/lib/i386/libfontmanager.so 49d69000-49d93000 rw-p 00094000 03:02 182359 /usr/lib/j2re1.3/lib/i386/libfontmanager.so
49db4000-49dba000 r-xp 00000000 03:02 118722     /usr/lib/libjuseropt.so
49dba000-49dbc000 rw-p 00005000 03:02 118722     /usr/lib/libjuseropt.so
49dbc000-49df3000 r-xp 00000000 03:02 118724     /usr/lib/librecortopts.so
49df3000-49dfc000 rw-p 00036000 03:02 118724     /usr/lib/librecortopts.so
49dfc000-49e30000 r-xp 00000000 03:02 115895 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so 49e30000-49e3c000 rw-p 00033000 03:02 115895 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
49e3e000-49e8f000 r-xp 00000000 03:02 118725     /usr/lib/libsmapi.so
49e8f000-49e97000 rw-p 00050000 03:02 118725     /usr/lib/libsmapi.so
49e9a000-49eb0000 r-xp 00000000 03:02 118723     /usr/lib/librecoengconn.so
49eb0000-49eb4000 rw-p 00015000 03:02 118723     /usr/lib/librecoengconn.so

Local Time = Wed Feb 13 18:45:17 2002
Elapsed Time = 4
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (Blackdown-1.3.1-FCS mixed mode)
#
# An error report file has been saved as hs_err_pid17986.log.
# Please refer to the file for further information.
#
/usr/bin/vvstartaudiosetup: line 34: 17986 Aborted java com.ibm.speechapps.userwizard.UWizAudSet

--- end of snippet---

I wonder, is this again a locales issue or a bug in libc6, which I doubt?

-Andreas






Reply to: