Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

sfiJD.png

 

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"

 

Try:

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.

  • Author

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.

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).

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

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.

  • Author

It may be because I have never had to deal with environment variables before but that seemed to work. Thankyou.

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.