Configured executable does not exist

I am trying to run gradle via the wrapper 8.13. I updated from an older 7.x wrapper using the command on the website docs. However now I receive this error when trying to build.

There definitely no file/symlink at this address but ./gradlew -version shows it’s using jdk 21, it has the correct path, etc, so I’m unsure whats missing. This is being run through the window command prompt.

Caused by: org.gradle.api.InvalidUserDataException: The configured executable does not exist (C:\Users\myuser\.gradle\daemon\8.13\javac)
        at org.gradle.jvm.toolchain.internal.JavaExecutableUtils.resolveExecutable(JavaExecutableUtils.java:44)
        at org.gradle.jvm.toolchain.internal.JavaExecutableUtils.resolveJavaHomeOfExecutable(JavaExecutableUtils.java:54)
        at org.gradle.jvm.toolchain.internal.SpecificInstallationToolchainSpec.fromJavaExecutable(SpecificInstallationToolchainSpec.java:79)
        at org.gradle.api.internal.tasks.compile.JavaCompileExecutableUtils.getExecutableOverrideToolchainSpec(JavaCompileExecutableUtils.java:46)
        at org.gradle.api.plugins.JavaBasePlugin.lambda$createCompileJavaTask$5(JavaBasePlugin.java:231)
        at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:73)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:117)
        at org.gradle.api.internal.provider.OrElseFixedValueProvider.calculateOwnValue(OrElseFixedValueProvider.java:71)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:117)
        at org.gradle.api.internal.provider.FlatMapProvider.calculateOwnValue(FlatMapProvider.java:50)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:117)
        at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:82)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:117)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.withFinalValue(AbstractMinimalProvider.java:182)
        at org.gradle.api.internal.provider.DefaultProperty.finalValue(DefaultProperty.java:163)
        at org.gradle.api.internal.provider.DefaultProperty.finalValue(DefaultProperty.java:34)
        at org.gradle.api.internal.provider.AbstractProperty.finalizeNow(AbstractProperty.java:308)
        ... 47 more

./gradlew -version says:

Build time:    2025-02-25 09:22:14 UTC
Revision:      073314332697ba45c16c0a0ce1891fa6794179ff

Kotlin:        2.0.21
Groovy:        3.0.22
Ant:           Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM:  21.0.6 (Eclipse Adoptium 21.0.6+7-LTS)
Daemon JVM:    C:\Program Files\Eclipse Adoptium\jdk-21.0.6.7-hotspot (no JDK specified, using current Java home)
OS:            Windows 11 10.0 amd64

Hard to say without seeing you build script, but I’d say you (or some misbehaving plugin) somewhere configured "javac" or File("javac") as manual executable for some task.

The error shows that your build relies on the current working directory, which makes it inherently broken. It is must probably just been coincidence that it did not fail with Gradle 7.

What do you recommend? Wiping the gradlew files from my project and re-adding them? The same version works fine in another repo, but doesn’t work here after the update.

No, wiping the Gradle files will not have any effect.
What I recommend is fixing your broken build.
How I cannot tell as I said, without seeing the build scripts.

Ok it looks like the problem is this flag which I added four years ago because it was required by a library I used. Commenting this out fixes the issue but I need to look into whether this library works anymore and why this was needed

// "parameters" flag required for moonshine to work
compileJava {
    options.compilerArgs += ["-parameters"]
    options.fork = true
    options.forkOptions.executable = 'javac'
}

The first is probably the one necessary.
The second and third most likely not and the third is definitely the problem.