Fork me on GitHub
#babashka
<
2023-04-08
>
eval202012:04:24

The following works with bb but not when using the standalone jar:

$ java -jar ~/Downloads/babashka-1.3.176-standalone.jar -e '(babashka.process/exec ["ls" "-la" ])'
:thinking_face:

eval202012:04:30

----- Error --------------------------------------------------------------------
Type:     java.lang.NoClassDefFoundError
Message:  org/graalvm/nativeimage/ProcessProperties
Location: <expr>:1:1

----- Context ------------------------------------------------------------------
1: (babashka.process/exec ["ls" "-la" ])
   ^--- org/graalvm/nativeimage/ProcessProperties

----- Stack trace --------------------------------------------------------------
babashka.process/exec - <built-in>
user                  - <expr>:1:1

borkdude12:04:56

exec only works in a graalvm native-image, see the docstring

Jakub Šťastný17:04:04

Yeah exec is a huge point scored by babashka. Esp. for those with unix backgrounds (rather than JVM background).