Closed jadenquinn closed 2 months ago
Minecraft 1.21 uses java 21.. why are you trying to use java 8?
setupDecompWorkspace hasn't been a thing for years. Perhaps try reading the Readme that comes with the mdk.
All you need is java 21 and gradlew build.
Because I already had Java 8 and because the other version I had (22) wasn't working. Also, the documentation says I need Java 17, which I'm sure wouldn't work with 1.21... soooo... maybe that should be updated for the version that doc is for.
I might try this down the line in a year or so when everything is finished.
What do you mean finished, everything works fine, you need Java 21. Waiting is not going to fix that.
Join our Discord if you need help. https://discord.minecraftforge.net/
:wave: We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for the Forge Support Forums or Forge Discord. Please create a new topic on the support forum with this issue or ask in a support channel in the Discord server, and the conversation can continue there.
I know Gradle 8.7 isn't compatible with Java 22 yet, so I set the path variable to be Java 8, as instructed from multiple forum posts and stuff around the internet, but this doesn't actually work anymore. At some point this changed, and there is some other way you have to set the path variable, probably because I'm on Windows 11 (the horror). I've also tried setting different things in the properties file to try and change what JDK it uses, and in the gradlew file itself, gradlew.bat, build.gradle, and settings.gradle. None had any effect except some made it worse to where it wouldn't even try to run and THEN error, it would just not run at all. I have no idea how anyone gets this to work. Through this, I am attempting to use Java 8 Update 421, since that's the 2nd newest I have installed... nevermind that Minecraft won't run I'm pretty sure unless it's launching with Java 22... so this problem doesn't make any sense to begin with. The docs say to use Java 17... but again that makes no sense since Minecraft 1.20 won't launch at all through that anyway, so I'm just using the one I already have installed.
Here's the borderline useless error I get:
D:\Dev Crap\forge-1.21.1-52.0.9-mdk>gradlew setupDecompWorkspace To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation. Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
What went wrong: BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 66
Try:
BUILD FAILED in 2s
D:\Dev Crap\forge-1.21.1-52.0.9-mdk>
When providing development tools, it is imperative that you have rock-solid documentation to go with it. I don't even see setupDecompWorkspace in the starter documentation at all. What is that about? Is this just old info?
Update: I tried Java 17, and I still get the same error.
Update 2: D:\Dev Crap\forge-1.21.1-52.0.9-mdk>java --version java 22.0.2 2024-07-16 Java(TM) SE Runtime Environment (build 22.0.2+9-70) Java HotSpot(TM) 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing)
D:\Dev Crap\forge-1.21.1-52.0.9-mdk> This would be why. I just installed Java 17, but for some reason the default one didn't change. Please someone tell me how to make Gradle use Java 17, as changing it for the entire system is really stupid, and Gradle is the only thing that needs to run under it.