The currently used Java version in the industry is Java 8 or newer, since 2022.
See <https://en.wikipedia.org/wiki/Java_version_history>. And on macOS 11..13,
I'm seeing the "error: Source option 6 is no longer supported. Use 8 or later."
* gettext-runtime/configure.ac: Search for a Java compiler with source and
target 1.8.
* gettext-tools/configure.ac: Search for a Java compiler with source 1.8.
* gettext-tools/examples/hello-java/configure.ac: Likewise.
* gettext-tools/examples/hello-java-awt/configure.ac: Likewise.
* gettext-tools/examples/hello-java-swing/configure.ac: Likewise.
dnl Configuration for the gettext-runtime directory of GNU gettext
-dnl Copyright (C) 1995-2010, 2012-2015, 2018-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
gt_JAVA_CHOICE
AS_IF([test "$JAVA_CHOICE" != no], [
- gt_JAVACOMP([1.5], [1.6])
+ gt_JAVACOMP([1.8], [1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
BUILDJAVA=yes
gt_JAVA_CHOICE
AS_IF([test "$JAVA_CHOICE" != no], [
gt_JAVAEXEC
- gt_JAVACOMP([1.5])
+ gt_JAVACOMP([1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
BUILDJAVA=yes
dnl Check whether we can execute Java programs.
gt_JAVAEXEC([TestAWT], [$srcdir/m4])
dnl Check whether we can build Java programs.
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
BUILDJAVA=yes
dnl Check whether we can execute Java programs.
gt_JAVAEXEC([TestAWT], [$srcdir/m4])
dnl Check whether we can build Java programs.
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
BUILDJAVA=yes
dnl Check whether we can execute Java programs.
gt_JAVAEXEC
dnl Check whether we can build Java programs.
-gt_JAVACOMP([1.5])
+gt_JAVACOMP([1.8])
AC_CHECK_PROG([JAR], [jar], [jar])
if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
BUILDJAVA=yes
Java compilers create the class files in the source file's directory -
which is in a temporary directory in our case. */
java_sources[0] = java_file_name;
- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
+ if (compile_java_class (java_sources, 1, NULL, 0, "1.8", "1.8", directory,
true, false, true, verbose > 0))
{
if (!verbose)