Jump to content

Build failed with an exception. JAVA_HOME environment variable causing me issues


Recommended Posts



As shown in the picture (sort of) when trying to get gradlew setupDecompWorkspace I am getting this error:


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 "C:\Program Files\Java\jre1.8.0_102"



Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


END of error



As the error states that JAVA_HOME does not point to the JDK, I must be doing something wrong as shown in the picture, I have an environment variable JAVA_HOME pointing to java jdk1.8xxxx


I have spent some time trying to figure it out without luck. I feel like I am overlooking something small, if anyone can help I will be very thankful.

Link to comment
Share on other sites

The issue that seems to be occurring is that the command prompt isn't even recognizing the change I am making to the variable. As if it is looking somewhere else for it. I tried the bin and that didn't work either.

This may seem really obvious and stupid, but did you try turning it off and back on again? (Note you usually need to restart after editing environment variables).


I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.