It looks like the (unofficial) Clojure chocolatey package, installs its own
clj.bat file.

The "-m package.name" syntax only works for clojure packages that are on
your classpath, and that script doesn't put the current directory on the
classpath.  You might have better luck with something like:

  clj -i "hello.clj" -e "(hello/-main)"

However,

Clojure 1.2 is pretty ancient; and I don't think many people are using
chocolatey to install clojure.
(Many of the linux package managers are similarly out of date).

You would probably be better off looking at using Leiningen instead for
your Clojure installation.

-- 
Dave



On Tue, Mar 5, 2013 at 3:35 PM, MC Andre <andrew.penneba...@gmail.com>wrote:

> Clojure can't find hello.clj in the current directory when run as "clj -m 
> hello".
>
>
> Trace:
>
>       C:\Documents and Settings\apenneba\Desktop>type hello.clj
>
>       (ns hello
>       (:gen-class))
>
>       (defn -main [& args]
>         (println "Hello World!"))
>
>       C:\Documents and Settings\apenneba\Desktop>clj -m hello
>       Exception in thread "main" java.io.FileNotFoundException: -m (The 
> system cannot find the file specified)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(Unknown Source)
>         at java.io.FileInputStream.<init>(Unknown Source)
>         at clojure.lang.Compiler.loadFile(Compiler.java:5817)
>         at clojure.main$load_script.invoke(main.clj:221)
>         at clojure.main$script_opt.invoke(main.clj:273)
>         at clojure.main$main.doInvoke(main.clj:354)
>         at clojure.lang.RestFn.invoke(RestFn.java:458)
>         at clojure.lang.Var.invoke(Var.java:377)
>         at clojure.lang.AFn.applyToHelper(AFn.java:174)
>         at clojure.lang.Var.applyTo(Var.java:482)
>         at clojure.main.main(main.java:37)
>
>
> System:
>
>
> * Clojure 1.2.0
>
> * Chocolatey 0.9.8.20
>
> * Windows XP SP3
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to