Re: Clojure *compile-path* not set properly
That's the default. You'd usually use the sys env clojure.compile.path for the repl (on windows): java -Dclojure.compile.path=.;src;classes -cp clojure.jar clojure.main Clojure 1.2.0 user= *compile-path* .;src;classes On Mar 6, 5:32 pm, MC Andre andrew.penneba...@gmail.com wrote: Clojure can't find and compile my scripts unless I augment the compile path. Specs: Clojure 1.2.0 MacPorts 1.9.2 Mac OS X 10.6.6 $ cat hello.clj #!/usr/bin/env clj (ns hello) (println Hello World!) $ clj hello.clj Hello World! $ clj Clojure 1.2.0 user= (compile 'hello) Hello World! java.io.IOException: No such file or directory (NO_SOURCE_FILE:0) user= *compile-path* classes user= (set! *compile-path* (str *compile-path* :.)) classes:. user= (compile 'hello) Hello World! hello -- 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
Re: Clojure *compile-path* not set properly
The Java system property clojure.compile.path is the directory where the Clojure compiler will write out .class files. It should be one directory name, not a list. When Clojure starts, it sets the Var *compile-path* to the value of the Java system property. The default is the directory named classes. Whatever value you set for clojure.compile.path, that directory must also be on the Java classpath, set with the -cp command-line option to java. So, if you want to compile Clojure namespaces rooted at the current directory, you would run: java -Dclojure.compile.path=. -cp .:clojure.jar clojure.main -Stuart Sierra clojure.com -- 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
Re: Clojure *compile-path* not set properly
Oops -- I got the class and compile paths mixed up. But I wonder why that worked in the OP. On Mar 7, 6:27 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: The Java system property clojure.compile.path is the directory where the Clojure compiler will write out .class files. It should be one directory name, not a list. When Clojure starts, it sets the Var *compile-path* to the value of the Java system property. The default is the directory named classes. Whatever value you set for clojure.compile.path, that directory must also be on the Java classpath, set with the -cp command-line option to java. So, if you want to compile Clojure namespaces rooted at the current directory, you would run: java -Dclojure.compile.path=. -cp .:clojure.jar clojure.main -Stuart Sierra clojure.com -- 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