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

Re: Locales and Java



On Wed, Feb 13, 2002 at 06:48:20PM +0100, Andreas von Heydwolff wrote:
| dman wrote:
[...]

| >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).
|
| 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)

Hmm, nice.  Just remove the whole "META-INF" directory before you
create the jar.  That directory is some piece of magic that 'jar' will
create for you and is the only difference between a "jar" file and a
"zip" file.

|   and the size of the resulting *.jar archive is only 11kB instead of 
| 280kB.

Yeah, 'jar' crashed before it finished creating the archive.

| The culprit META-INF/MANIFEST.MF reads

I know nothing about the META-INF directory aside from what I said
above.

| 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

Nice.  You managed to crash the JVM.  I've done it a few times before.
(java isn't all that Sun's marketing department has been claiming it
is)

| Current Java thread:
|         at 
| com.ibm.speechcomponents.user.VvUserOpts.VvUserOptsInitialize(Native Method)
                                                                ^^^^^^^^^^^^^

You said you got this program from a RH rpm, right?  Perhaps the
"native" (C/C++) portion of this program isn't binary compatible with
the libc on your debian box.

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

Do you get the same result if you use the original jar file and set
LANG to "en_US"?  If so, then it is not a locale-specific issue.
Given that the app isn't "pure java" (not surprising, java is too
limited for many things), it could be a libc mismatch issue.

-D

-- 

He who finds a wife finds what is good
and receives favor from the Lord.
        Proverbs 18:22



Reply to: