An error occurs when using Kotlin after creating the mod: Failed to setup Minecraft, java.lang.RuntimeException: Unexpected IllegalAccessException occurred (Gson 2.9.1). Certain ReflectionAccessFilter features require Java >= 9 to work correctly. If you are not using ReflectionAccessFilter, report this to the Gson maintainers. #3655
Replies: 1 comment 2 replies
-
Okay, now I know why, because something conflicted. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hi, today I had some problems creating a Fabric Mod:
After I create a new Mod and add Kotlin language support to it, it always happens this problem when doing a build:
What's going on here?
Maybe I need to provide more information:
2, I tested changing the project's JDK to JDK17 and JDK21 respectively
3, My Minecraft version is 1.20.2, Fabric version is 0.91.6, Loader version is 0.15.7, Yarn Mappings version is 0.91.6+1.20.2, Fabric Loom version is 1.5-SNAPSHOT, org.jetbrains. kotlin.jvm version is 1.9.23, as well as my Gradle is 8.5-bin, and the Path variable and JAVA_HOME are both set to the correct JDK-21 in the Windows environment variables.
4, I've built the project without switching the programming language of the project to Kotlin, and the build was successful at that time, but I don't see Fabric in IntelliJ IDEA's runtime configuration, so I can't test that the project worked properly before the programming language was switched to Kotlin.
As well as a bit of what you guys might need:
My project has two modules, one Fabric and one NeoForge, now this NeoForge module builds fine even with Kotlin installed (haven't tried to run it, I don't have a lot of time, but I'll comment below after running it), and the Gradle for both modules is independent.
Much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions