I need to get inputStream from ./resources but I got all the time NULL. Let me show you, what I did.
This is my simple code:
private const val CREDENTIALS_FILE_PATH = "/credentials.json"
val inputStream = javaClass.getResource(CREDENTIALS_FILE_PATH)
When I set debugger on inputStream, I got null all the time.
I tried write input in different way, but it also do not work.
val inputStream = this::class.java.classLoader.getResource(CREDENTIALS_FILE_PATH)
val inputStream = javaClass.classLoader.getResource(CREDENTIALS_FILE_PATH)
So I did something like that:
val inputStream = javaClass.getResource(".")
and I think there is problem, because this path refer to ./out/test/classes
not to ./out/test/resources
Can I ask for some advice so that I can point to the file from ./resources?