[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: msgfmt --java2 compatibility bug
From: |
Bruno Haible |
Subject: |
Re: msgfmt --java2 compatibility bug |
Date: |
Tue, 20 Jan 2009 21:18:40 +0100 |
User-agent: |
KMail/1.9.9 |
[This bug report would better have been sent to bug-gnu-gettext, not to
bug-autoconf. Please drop bug-autoconf from your replies.]
Bea Petrovicova wrote:
> msgfmt --java2 compatibility bug
>
> There is no option in gettext to specify java target version.
> If gettext bundle is compiled with Java 1.6 and then
> run on 1.5 program crashes.
>
> (Both 1.5 and 1.6 are supported versions nowadays).
> Unfortunately linux maintainers commonly compile
> using 1.6 causing java programs using gettext crash.
>
> Solution would be to allow msgfmt to specify java
> compiler options or to set 'javac -target 1.5' option.
This works fine in gettext 0.17, with the reference implementation
of Java from Sun:
$ java -version 2>&1 | head -n 1
java version "1.6.0"
$ javac -version
javac 1.6.0
$ msgfmt --java2 -d . de.po
$ od -A n -t d1 -j 7 -N 1 Messages.class
45
# This means the generated Messages.class is in Java 1.1 format.
And the libintl.jar:
$ unzip -x PREFIX/share/gettext/libintl.jar gnu/gettext/GettextResource.class
Archive: /arch/x86-linux/gnu/share/gettext/libintl.jar
inflating: gnu/gettext/GettextResource.class
$ od -A n -t d1 -j 7 -N 1 gnu/gettext/GettextResource.class
45
# This means the libintl.jar is also in Java 1.1 format.
As you can see, GNU gettext passes the necessary -target options already,
that ensure that the resulting classes and jars can be executed with any
version of Java >= 1.3.
Some Java compilers don't allow to specify the target version; when confronted
to such compilers, msgfmt of course can only produce class files in the format
generated by that compiler.
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: msgfmt --java2 compatibility bug,
Bruno Haible <=