diff options
author | Bruno Haible <bruno@clisp.org> | 2018-03-24 12:54:42 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-03-24 13:05:42 +0100 |
commit | 2d3dd35cb263f6566b2924a2adae99385c440f46 (patch) | |
tree | 9a0002017f5e5dfe30ca63cefc83a1bd051325a4 /lib/javacomp.h | |
parent | 70a913d7d4d0683c1fdf1988049b2add1095c276 (diff) | |
download | gnulib-2d3dd35cb263f6566b2924a2adae99385c440f46.tar.gz |
javacomp-script, javacomp: Fix support for Java 7, 8, 9.
* lib/javaversion.h: Update comments.
* lib/javacomp.h: Likewise.
* lib/javacomp.c (default_target_version, source_version_index,
get_goodcode_snippet, get_failcode_snippet): Recognize "9" instead of
"1.9".
(TARGET_VERSION_BOUND): Bump to 9.
(target_version_index, corresponding_classfile_version): Recognize "9"
instead of "1.9".
(get_source_version_for_javac): New function.
(is_envjavac_nongcj_usable, is_javac_usable): Add
source_version_for_javac argument.
(compile_java_class): Determine and pass source_version_for_javac.
* m4/javacomp.m4: Recognize version '9' instead of '1.9'. When invoking
$JAVAC or javac, pass '-source 1.6' instead of '-source 1.5' when
appropriate.
Diffstat (limited to 'lib/javacomp.h')
-rw-r--r-- | lib/javacomp.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/javacomp.h b/lib/javacomp.h index 3d0a02d615..3d73a9205b 100644 --- a/lib/javacomp.h +++ b/lib/javacomp.h @@ -31,7 +31,7 @@ 1.6 (not supported) 1.7 switch(string) 1.8 lambdas - 1.9 private interface methods + 9 private interface methods target_version can be: classfile version: 1.1 45.3 1.2 46.0 @@ -41,7 +41,7 @@ 1.6 50.0 1.7 51.0 1.8 52.0 - 1.9 53.0 + 9 53.0 target_version can also be given as NULL. In this case, the required target_version is determined from the found JVM (see javaversion.h). Specifying target_version is useful when building a library (.jar) that is @@ -53,7 +53,7 @@ - target_version < 1.6 with source_version >= 1.6, or - target_version < 1.7 with source_version >= 1.7, or - target_version < 1.8 with source_version >= 1.8, or - - target_version < 1.9 with source_version >= 1.9, + - target_version < 9 with source_version >= 9, because even Sun's/Oracle's javac doesn't support these combinations. It is redundant to ask for a target_version > source_version, since the smaller target_version = source_version will also always work and newer JVMs |