[Top][All Lists]

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

Re: [bug-gettext] address@hidden: Bug#910246: gettext: FTBFS with Java 1

From: Bruno Haible
Subject: Re: [bug-gettext] address@hidden: Bug#910246: gettext: FTBFS with Java 11: unknown target-version 11, please update gt_JAVACOMP macro]
Date: Thu, 04 Oct 2018 11:06:30 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-137-generic; KDE/5.18.0; x86_64; ; )

Hi Emmanuel,

> Out of curiosity, why is such a sophisticated Java version detection
> logic necessary? As far as I know it's rather unique. If gettext only
> needs a Java 1.4 compiler any version of Java released in the past 15
> years is suitable anyway.

The 'javacomp' macro and module are made for packages that install
compiled Java code (.jar files), which may be run by a different Java
version than the one that compiled it.

1) Due to the bytecode format, code compiled by java version X (without
   particular options) cannot be run by java version Y, where Y < X.
   This is not a problem for distros, because distros know which is their
   minimum supported Java version, but is a problem when users compile
   a package on their own. So, the need arises to use the '-target' option.
   But not all javac versions support the '-target' option; GCJ had a
   different but similar option. So one needs to look carefully at the
   javac compiler version...

2) The Java language evolves. Code that was correct in the past may not
   compile with newer Java versions, without particular options. For
   example, code that defines a method named 'assert' or 'var'. So, one
   needs to use the '-source' option. Again, this option depends on the
   compiler brand and version.

Additionally, the two are intertwined, because you cannot use the
'-target' option without the '-source' option...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]