I'm having this same issue--on Ubuntu, have java 11 & 8 installed, switched to java 8 with
sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
Tried running
./gradlew setupDecompWorkspace
But got
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':recompileMc'.
> Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-8-openjdk-amd64/jre"
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.924 secs
I tried with --debug and --stacktrace but didn't get anything particularly useful.
Anyone else run across this and remember how to fix it?