Fork me on GitHub
#graalvm
<
2023-02-10
>
Coby Tamayo20:02:23

As a general intuition check, should I forget about classpath as a runtime concern in GraalVM-compiled programs? For example, when reading from the filesystem, should I prefer calling slurp directly over io/resource? Does classpath serve any purpose at runtime?

borkdude20:02:25

@U04NMTEL6TX Classpath still works for io/resource but you have to explicity configure your build to keep resources around in your image

borkdude20:02:34

Note that these regexes are classpath resource paths, not file system paths

Coby Tamayo20:02:34

But if I don't know ahead of time where the config file would live (say it's a CLI option on the binary itself) then I would not be able to use resource in this way, correct?

borkdude20:02:58

yes, but this is also true of regular JVM programs

Coby Tamayo20:02:01

That's what I thought, just wanted to confirm. Thanks! 🙂

👍 2
Coby Tamayo20:02:09

btw I found your Hello World GraalVM video extremely helpful, so thanks for that too.

borkdude20:02:18

Cool!

🙌 2