Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to setupDecompWorkspace: Unsupported class file major version 66 #948

Closed
jadenquinn opened this issue Sep 4, 2024 · 5 comments
Closed
Labels
forum Not an issue with ForgeGradle, see the forums

Comments

@jadenquinn
Copy link

jadenquinn commented Sep 4, 2024

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

Unsupported class file major version 66

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

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.

@LexManos
Copy link
Member

LexManos commented Sep 4, 2024

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.

@LexManos LexManos closed this as completed Sep 4, 2024
@jadenquinn
Copy link
Author

jadenquinn commented Sep 9, 2024

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.

@RealMangorage
Copy link
Contributor

What do you mean finished, everything works fine, you need Java 21. Waiting is not going to fix that.

@RealMangorage
Copy link
Contributor

Join our Discord if you need help. https://discord.minecraftforge.net/

@Jonathing Jonathing added the forum Not an issue with ForgeGradle, see the forums label Sep 10, 2024
Copy link

github-actions bot commented Sep 10, 2024

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

@github-actions github-actions bot locked as off-topic and limited conversation to collaborators Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
forum Not an issue with ForgeGradle, see the forums
Projects
None yet
Development

No branches or pull requests

4 participants