I'm trying to follow the guide here: https://www.clojure.org/guides/deps_and_cli to run a simple clojure program.
My directory structure looks like this:
└── test-project
├── deps.edn
└── src
└── bar.clj
and bar.clj
looks like this:
(ns bar)
(defn main []
(printl "hello world"))
However, when I run clj -X bar/main
I get the following error:
Exception in thread "main" java.io.FileNotFoundException: -X (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at clojure.lang.Compiler.loadFile(Compiler.java:7570)
at clojure.main$load_script.invokeStatic(main.clj:452)
at clojure.main$script_opt.invokeStatic(main.clj:512)
at clojure.main$script_opt.invoke(main.clj:507)
at clojure.main$main.invokeStatic(main.clj:598)
at clojure.main$main.doInvoke(main.clj:561)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:37)
What am I doing wrong?