Indeed. If your project has dependencies that are being managed by Leiningen, you probably want to use Leiningen to run it (so that the classpath can be set properly to include all those dependencies; it can vet very long), or tell Leiningen to build an uberjar that embeds both your code and all of the dependencies. Then you can run that simply with java -jar
https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#running-code https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md#uberjar -James On Monday, December 28, 2015 at 5:10:35 PM UTC-6, Erik Price wrote: > > 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 <javascript:>> 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 clo...@googlegroups.com >> <javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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+u...@googlegroups.com <javascript:>. >> 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.