graalvm

Coby Tamayo 2023-02-10T20:24:23.378149Z

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?

borkdude 2023-02-10T20:26:25.790499Z

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

borkdude 2023-02-10T20:27:34.544619Z

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

Coby Tamayo 2023-02-10T20:29:34.107559Z

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?

borkdude 2023-02-10T20:29:58.509139Z

yes, but this is also true of regular JVM programs

Coby Tamayo 2023-02-10T20:31:01.117549Z

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

👍 1
Coby Tamayo 2023-02-10T20:33:09.046509Z

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

borkdude 2023-02-10T20:33:18.518269Z

Cool!

🙌 1