https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
g

Guilherme Delgado

09/17/2022, 6:44 PM
Anyone trying to perform network calls and facing
Exception in thread "main" java.lang.NoClassDefFoundError: java/net/http/HttpClient$Version
? More here https://kotlinlang.slack.com/archives/C3PQML5NU/p1663372636232599
a

Andreas Scheja

09/17/2022, 10:06 PM
What jvm version you're running on? The java http client requires version 11 or higher
How are you running it?
g

Guilherme Delgado

09/17/2022, 10:45 PM
So I was running with
/gradlew runDistributable
because i need to test deeplinks. But if I type
/gradlew run
it works, it doesn’t throw NoClassDefFoundError.
do I need to add any configuration to include some lib in the Distributable? 🤔 Something like this perhaps.
a

Andreas Scheja

09/17/2022, 10:48 PM
yeah, you could try including the
java.net.http
module
g

Guilherme Delgado

09/17/2022, 10:49 PM
yeah correct, I’ve tested with
includeAllModules = true
and it worked
and `modules("java.net.http")`works too
gratitude thank you 1
Thanks for your time! 🙏
14 Views