Search code examples
clojuregraalvm

Compiled image from graalvm not printing to standard out


Graalvm version: graalvm-ce-19.0.0

Clojure version: Clojure 1.10.0

Leiningen 2.9.0 on Java 11.0.2 OpenJDK 64-Bit Server VM

In my project (https://github.com/slifin/beeline) if I run

lein run "{\":select\" [\":b\"]}"

I get

["SELECT b"]

as I expected but if I do

lein native-image

and run

./beeline-0.1.0-SNAPSHOT "{\":select\" [\":b\"]}"

I get no output, though I know my program is running because if I change the input I get errors that make sense for my program, what's stopping it from printing?


Solution

  • Try (flush) at the end of your main function.