This expression will provide a string that is the classpath ((into {} (System/getProperties)) "java.class.path")
There's probably a more elegant way... anyone? On Feb 5, 4:03 pm, Mike Jarmy <mja...@gmail.com> wrote: > I'd like to take a stab at fixing it from the command line if I can. > I'm working on a script that I actually want to use from the command > line -- the clojure part I think I have under control for now, since > the script works just fine as one big file. > > I've got cygwin installed, and when I run env, I can see that I have > no CLASSPATH set (or JAVA_HOME if that matters), which is as per usual > because CLASSPATH tends to get in the way. > > So when I run: > > java -cp .;lib/clojure.jar clojure.main foo.clj > > from the same directory that foo.clj and foo-util.clj reside in, > closure should see them, no? Can you suggest what sort of diagnostic > info I can print out inside my script so clojure can tell me what it > thinks the classpath is? > > On Fri, Feb 5, 2010 at 3:46 PM, Sean Devlin <francoisdev...@gmail.com> wrote: > > You're running into a classpath issue. You'll need to have both files > > on you classpath. If you're just getting started, I'd suggest using > > Netbeans/Enclojure, as it handles the classpath stuff for you, and you > > can focus on learning Clojure. > > > On Feb 5, 3:41 pm, Mike Jarmy <mja...@gmail.com> wrote: > >> winXP, java 1.6 > > >> On Fri, Feb 5, 2010 at 3:31 PM, Sean Devlin <francoisdev...@gmail.com> > >> wrote: > >> > What development environment are you using? > > >> > On Feb 5, 1:57 pm, Mike Jarmy <mja...@gmail.com> wrote: > >> >> I'm writing a clojure program which is getting sort of large, so I'd > >> >> like to split it up into separate source files. However, I'm having > >> >> trouble figuring out how to tell the files about each other's > >> >> existence. I'd like all the source files to be in the same > >> >> namespace. Can someone straighten me out? Here is a typical example > >> >> of the sort of things that I've tried: > > >> >> java -cp .;lib/clojure.jar clojure.main foo.clj > > >> >> yields > > >> >> java.io.FileNotFoundException: Could not locate > >> >> foo_util__init.class or foo_util.clj on classpath: > > >> >> with the following source files (all in the same directory that I'm > >> >> running clojure.main from) > > >> >> ------------------------------- > >> >> foo.clj: > > >> >> (ns foo) > > >> >> (require 'foo-util) > > >> >> (defn main [] > >> >> (print "hello from main\n") > >> >> (frob)) > > >> >> (main) > > >> >> ------------------------------- > >> >> foo-util.clj > > >> >> (ns foo) > > >> >> (defn frob [] > >> >> (print "hello from frob\n")) > > >> > -- > >> > 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 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 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