The -cp flag should be passed a colon-separated list of entires to search
for dependency code. Each entry in the list can be either a directory (in
which case the contents of the directory must immediately contain Java or
Clojure source files) or a JAR file. So the command you’re currently using
says “look for dependencies in the cljs.jar file and the src directory”.

Leiningen downloads and locally caches the dependencies you list in your
project.clj for you. If you’re sure those dependencies have already been
downloaded to your system, try including the paths to those dependencies’
JAR files in your -cp argument.

e
​

On Mon, Dec 28, 2015 at 5:54 PM, <fah...@gmail.com> wrote:

> hi
>
> I have a ClojureScript project. It builds successfully with lein
> cljsbuild once and I'm able to run my program on node.
>
> I'm trying to follow the QuickStart guide for getting a node REPL.
>
> I have node.clj
> (require 'cljs.build.api)
>
> (cljs.build.api/build "src"
>   {:main 'hello-world.core
>    :output-to "main.js"
>    :target :nodejs})
>
> But when I run java -cp cljs.jar:src clojure.main node.clj
>
> It says: No such namespace and refers to a dependency that I've listed in
> project.clj. Do I need to add something to the -cp argument when I call
> java?
>
> Thanks in advance for any help!
>
> --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to