MC Andre, if you put hello.clj in the src folder you should be able to do
(load hello). (load-file file-name) should work for files not on the
classpath, so (load-file hello.clj) means look for hello.clj in the
current working dir.
Pretty easy to inspect the classpath in the repl, e.g: (filter
On 27 March 2013 15:14, Alf Kristian Støyle alf.krist...@gmail.com wrote:
[...]
Pretty easy to inspect the classpath in the repl, e.g: (filter #(= (key
%) java.class.path) (System/getProperties))
Or:
(get (System/getProperties) java.class.path)
--
Michael Wood esiot...@gmail.com
--
--
Leif:
I works for me if I run 'lein repl' *outside* of a project. In that
case, is on the classpath, so . looks in the current directory.
When you run 'lein repl' *inside* of a project, however, the top-level
project directory is not on the classpath. . in this case probably means
try (load-file hello.clj)
On Tuesday, March 26, 2013 9:25:43 AM UTC-7, MC Andre wrote:
I tried setting *compile-path* to ., but Clojure still can't find
hello.clj.
Trace:
$ cat hello.clj
(ns hello
(:gen-class))
(defn -main [ args]
(println Hello World!\n))
$ lein repl
nREPL
I works for me if I run 'lein repl' *outside* of a project. In that case,
is on the classpath, so . looks in the current directory.
When you run 'lein repl' *inside* of a project, however, the top-level
project directory is not on the classpath. . in this case probably means
look in the