[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
javacomp-script, javacomp: Add support for Java 11 and further
From: |
Bruno Haible |
Subject: |
javacomp-script, javacomp: Add support for Java 11 and further |
Date: |
Wed, 26 Sep 2018 22:24:59 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; ) |
Java 11 was released yesterday.
1) The first patch adds support for this
Java version to the 'javacomp-script' and 'javacomp' modules.
With it, the config.log output in gettext-tools, when run in an environment
with Java 11 in the $PATH, changes from
========================= BEFORE =========================
configure:6578: CLASSPATH=. java conftestver
configure:6585: WARNING: unknown target-version 11, please update gt_JAVACOMP
macro
configure:6638: checking for Java compiler
configure:6884: found /usr/local/java/jdk-11/bin/javac
configure:7030: javac -d . conftest.java
configure:7059: javac -target 1.1 -d . conftest.java
warning: target release 1.1 conflicts with default source release 11
configure:7088: javac -target 1.1 -source 1.5 -d . conftest.java
warning: source release 1.5 requires target release 1.5
configure:7125: result: no
to
========================= AFTER =========================
configure:6578: CLASSPATH=. java conftestver
configure:6641: checking for Java compiler
configure:6887: found /usr/local/java/jdk-11/bin/javac
configure:7033: javac -d . conftest.java
configure:7040: javac -source 1.6 -d . conftest.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future
release
warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
3 warnings
configure:7045: javac -d . conftestfail.java
configure:7049: javac -source 1.6 -d . conftestfail.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future
release
warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
conftestfail.java:1: error: strings in switch are not supported in -source 6
class conftestfail { void foo () { switch ("A") {} } }
^
(use -source 7 or higher to enable strings in switch)
1 error
3 warnings
configure:7128: result: javac -source 1.6
2) With this new version, the rapid release cycles continue. In order to
not have Java 12 and then Java 13 etc. rejected by the two modules, let
me add code that accepts these new versions using minimal assumptions.
When such a Java version gets found, we continue to use
"-source 1.6" etc., as if it were version 11.
With just this patch alone and without the first patch, the gettext-tools
config.log changes from
========================= BEFORE =========================
configure:6578: CLASSPATH=. java conftestver
configure:6585: WARNING: unknown target-version 11, please update gt_JAVACOMP
macro
configure:6638: checking for Java compiler
configure:6884: found /usr/local/java/jdk-11/bin/javac
configure:7030: javac -d . conftest.java
configure:7059: javac -target 1.1 -d . conftest.java
warning: target release 1.1 conflicts with default source release 11
configure:7088: javac -target 1.1 -source 1.5 -d . conftest.java
warning: source release 1.5 requires target release 1.5
configure:7125: result: no
to
========================= AFTER =========================
configure:6578: CLASSPATH=. java conftestver
configure:6639: checking for Java compiler
configure:6885: found /usr/local/java/jdk-11/bin/javac
configure:7031: javac -d . conftest.java
configure:7060: javac -target 10 -d . conftest.java
warning: target release 10 conflicts with default source release 11
configure:7089: javac -target 10 -source 1.6 -d . conftest.java
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future
release
warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
3 warnings
configure:7126: result: javac -target 10 -source 1.6
Of course, there is a certain risk that the assumptions won't hold.
Let's see.
0001-javacomp-script-javacomp-Add-support-for-Java-11.patch
Description: Text Data
0002-javacomp-script-javacomp-Add-preliminary-support-for.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- javacomp-script, javacomp: Add support for Java 11 and further,
Bruno Haible <=