Hi, in my `resources` folder I have a folder named...
# compose-desktop
a
Hi, in my
resources
folder I have a folder named
languages
with inside a
kotlin.json
file, but when I do
""::class.java.getResource("languages/kotlin.json")
I get
null
, why does it occurs ?
1
t
Can you try with
.java.*classLoader*.getResource
?
a
I get
Copy code
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.lang.ClassLoader.getResource(String)" because the return value of "java.lang.Class.getClassLoader()" is null
	at MainKt$App$1.invoke(Main.kt:22)
e
instead of
""
try one of your own classes.
String
is from the bootstrap classloader
a
oh it works, nice, thank you a lot !
281 Views