Skip to content

Conversation

@brachy84
Copy link
Member

@brachy84 brachy84 commented May 5, 2025

The reason for the crash is that Groovy uses its own version of ASM to read classes. In that version it can only read class files up to version 67 (java 23). Afaik only the classes from java itself have class version 68.
This pr obtains the class bytes not by manually searching pushing an input stream through a class reader, but by using forge methods. Which for some reason doesnt return anything for java classes. I have no idea where the java classes come from because they obviously work.

This likely will become a problem again once mods start to compile for java 24 and higher. At that point we will have to pull to a few classes from groovys asm decompiler and adjust them.

@brachy84 brachy84 marked this pull request as ready for review May 5, 2025 17:48
@Rongmario
Copy link
Member

  • Startup needed classes (essential Java classes, rt.jar and other jre/lib jars) gets loaded in the null class loader, basically the BootstrapClassLoader.
  • Other Java/JDK classes gets loaded in the PlatformClassLoader.
  • AppClassLoader or SystemClassLoader is what comes next, can be overriden by a startup argument, which is what Cleanroom does for Foundation's ActualClassLoader's parent.

@kappa-maintainer
Copy link

I no longer set launch class loader in argument now, but Foundation still supports doing so

@brachy84 brachy84 merged commit fff5f33 into master May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants