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

Cannot use java library in KFF, java.lang.NoClassDefFoundError #114

Open
filloax opened this issue Feb 2, 2025 · 0 comments
Open

Cannot use java library in KFF, java.lang.NoClassDefFoundError #114

filloax opened this issue Feb 2, 2025 · 0 comments

Comments

@filloax
Copy link

filloax commented Feb 2, 2025

Kotlin for forge version: 5.6.0

Minecraft version: 1.21.1

Hi, I am using a Java library (SocketIO) in my kotlin mod for an additional feature. While adding the library and other required libraries to the gradle implementation works in fabric, doing so in Forge with KFF leads to a `java.lang.NoClassDefFoundError' when trying to use the library's classes.

Relevant file in mod repo

Libraries in question (all requirements of the last 2):

"org.json:json:20231013",
"org.java-websocket:Java-WebSocket:1.5.7",
"com.squareup.okio:okio:3.6.0",
"com.squareup.okhttp3:okhttp:4.12.0",
"io.socket:engine.io-client:2.1.0",
"io.socket:socket.io-client:2.1.1"

Error:

Exception in thread "LiveCheckEgobalego" java.lang.NoClassDefFoundError: io/socket/client/IO$Options
	at TRANSFORMER/[email protected]/com.ruslan.growsseth.http.LiveUpdatesConnection.connect(LiveUpdatesConnection.kt:108)
	at TRANSFORMER/[email protected]/com.ruslan.growsseth.http.LiveUpdatesConnection.start$lambda$18(LiveUpdatesConnection.kt:324)
	at LAYER PLUGIN/kotlin.stdlib/kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
  [...]

As I have no real workaround for this other than somehow reimplementing SocketIO in my mod, any idea how to fix it?

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

No branches or pull requests

1 participant