Cath04/23/2021, 11:00 AM
var byteArray = this::class.java.classLoader.getResource("abc.jpg").readBytes()
Jonathan Olsson04/23/2021, 11:51 AM
Cath04/23/2021, 11:53 AM
Timo Gruen04/23/2021, 12:17 PM
(Note the absolute path of the resource)
var byteArray = this::class.java.classLoader.getResource("/abc.jpg").readBytes()
directory should be named
, which is the convention for such directories. If you are using gradle, this is the one being picked up by gradle while building and running your code.
Cath04/23/2021, 12:18 PM
Timo Gruen04/23/2021, 12:20 PM
) 2. Rename
If its still not working, just ping me and we ll see if I can help you somehow.
Cath04/23/2021, 12:20 PM
Nick Howes04/24/2021, 6:27 AM