diff --git a/src/main/org/apache/tools/ant/Project.java b/src/main/org/apache/tools/ant/Project.java index e9160024f..89dad393c 100644 --- a/src/main/org/apache/tools/ant/Project.java +++ b/src/main/org/apache/tools/ant/Project.java @@ -930,8 +930,8 @@ public class Project implements ResourceFactory { setPropertyInternal(MagicNames.ANT_JAVA_VERSION, javaVersion); // sanity check - if (!JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_1_5)) { - throw new BuildException("Ant cannot work on Java prior to 1.5"); + if (!JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_1_8)) { + throw new BuildException("Ant cannot work on Java prior to 1.8"); } log("Detected Java version: " + javaVersion + " in: " + System.getProperty("java.home"), MSG_VERBOSE); diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java index a551c0f6b..84e82fd30 100644 --- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java +++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java @@ -258,8 +258,8 @@ public final class JavaEnvUtils { * Compares the current Java version to the passed in String - * assumes the argument is one of the constants defined in this * class. - * Note that Ant now requires JDK 1.5+ so {@link #JAVA_1_0} through - * {@link #JAVA_1_4} need no longer be tested for. + * Note that Ant now requires JDK 1.8+ so {@link #JAVA_1_0} through + * {@link #JAVA_1_7} need no longer be tested for. * @param version the version to check against the current version. * @return true if the version of Java is the same as the given version. * @since Ant 1.5 @@ -273,8 +273,8 @@ public final class JavaEnvUtils { * Compares the current Java version to the passed in String - * assumes the argument is one of the constants defined in this * class. - * Note that Ant now requires JDK 1.5+ so {@link #JAVA_1_0} through - * {@link #JAVA_1_4} need no longer be tested for. + * Note that Ant now requires JDK 1.8+ so {@link #JAVA_1_0} through + * {@link #JAVA_1_7} need no longer be tested for. * @param version the version to check against the current version. * @return true if the version of Java is the same or higher than the * given version.