Hi, I'm experiencing the issue below specifically ...
# community-support
w
Hi, I'm experiencing the issue below specifically when using Gradle 9.7.1 via the gradle wrapper.
Copy code
./gradlew --version
...
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.AntMain
Reverting to Gradle 9.7.0 (manually updating
gradle-wrapper.properties
, since gradlew commands don't work) fixes this issue - output of
./gradlew --version
in thread. I had a project working with Gradle 9.7.1 as of a week ago but it seems to be failing now - is there any chance this is some form of upstream dependency issue?
Copy code
./gradlew --version
------------------------------------------------------------
Gradle 9.7.0
------------------------------------------------------------

Build time:    2026-08-06 14:07:35 UTC
Revision:      3defbfc59d757b873d787b2261de5c7f8a00970a

Kotlin:        2.4.0
Groovy:        4.0.32
Ant:           Apache Ant(TM) version 1.10.17 compiled on April 6 2026
Launcher JVM:  26.0.2 (Eclipse Adoptium 26.0.2+10)
Daemon JVM:    C:\Users\usr\.jdks\temurin-26.0.2 (no Daemon JVM specified, using current Java home)
OS:            Windows 11 10.0 amd64
I can't print the version for 9.7.1, otherwise I would try to check what version of Apache Ant it's trying to find.
v
Sounds to me like something - maybe your virus scanner - deleted the ant jar file from the distribution. Delete the whole distribution from
<GRADLE_USER_HOME>/wrapper/dists/<version>
and try again.